diff --git a/html5/index.html b/html5/index.html index 31316319..6264357f 100644 --- a/html5/index.html +++ b/html5/index.html @@ -445,9 +445,10 @@

Xpra Bug Report

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); @@ -1416,7 +1417,7 @@

Xpra Bug Report

} 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"; diff --git a/html5/js/Client.js b/html5/js/Client.js index f8f7fe44..54a851a9 100644 --- a/html5/js/Client.js +++ b/html5/js/Client.js @@ -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"; @@ -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) {