Skip to content

Commit

Permalink
#301 need to make top bar bigger
Browse files Browse the repository at this point in the history
and constify it whilst we're here
  • Loading branch information
totaam committed May 14, 2024
1 parent 2d2a19a commit 0b6a092
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions html5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,10 @@ <h2>Xpra Bug Report</h2>
return v;
};

const float_menu_item_count = 6;
const float_menu_item_size = 30;
const float_menu_padding = 20;
let float_menu_width = float_menu_item_size * 5 + float_menu_padding;
let float_menu_width = float_menu_item_size * float_menu_item_count + float_menu_padding;

let cdebug = function () {
Utilities.clog.apply(Utilities, arguments);
Expand Down Expand Up @@ -1416,7 +1417,7 @@ <h2>Xpra Bug Report</h2>
}

function expand_float_menu() {
const expanded_width = float_menu_item_size * 5;
const expanded_width = float_menu_item_size * float_menu_item_count;
const float_menu = document.getElementById("float_menu");
float_menu.style.display = "inline-block";
float_menu.style.width = expanded_width + "px";
Expand Down
5 changes: 2 additions & 3 deletions html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3203,8 +3203,7 @@ class XpraClient {
const float_menu_element = $(FLOAT_MENU_SELECTOR);
float_menu_element.children().show();
//increase size for tray icon
const new_width =
float_menu_width + float_menu_item_size - float_menu_padding + 5;
const new_width = float_menu_width + float_menu_item_size - float_menu_padding + 5;
float_menu.style.width = `${new_width}px`;
float_menu_width = float_menu_element.width() + 10;
mydiv.style.backgroundColor = "white";
Expand Down Expand Up @@ -3252,7 +3251,7 @@ class XpraClient {

reconfigure_all_trays() {
const float_menu = document.querySelector(FLOAT_MENU_SELECTOR);
let float_menu_width = float_menu_item_size * 4 + float_menu_padding;
let float_menu_width = float_menu_item_size * float_menu_item_count + float_menu_padding;
for (const twid in this.id_to_window) {
const twin = this.id_to_window[twid];
if (twin && twin.tray) {
Expand Down

0 comments on commit 0b6a092

Please sign in to comment.