13
0

Fix a thinko in x position of menu popups

This has lasted without being noticed because menus that big are not
common.
This commit is contained in:
Julien "_FrnchFrgg_" RIVAUD 2019-10-31 10:26:06 +01:00
parent 5e4d641488
commit 7d48b20652

View File

@ -365,7 +365,7 @@ _position_menu_anchored (int& x, int& y, bool& push_in,
x += allocation.get_width() - menu_req.width; x += allocation.get_width() - menu_req.width;
} else if (x + menu_req.width <= monitor.get_x() + monitor.get_width()) { } else if (x + menu_req.width <= monitor.get_x() + monitor.get_width()) {
/* b) align menu left and button left: nothing to do*/ /* b) align menu left and button left: nothing to do*/
} else if (menu_req.width > monitor.get_width()) { } else if (menu_req.width <= monitor.get_width()) {
/* c) align menu left and screen left, guaranteed to fit */ /* c) align menu left and screen left, guaranteed to fit */
x = monitor.get_x(); x = monitor.get_x();
} else { } else {
@ -378,7 +378,7 @@ _position_menu_anchored (int& x, int& y, bool& push_in,
} else if (monitor.get_x() <= x + allocation.get_width() - menu_req.width) { } else if (monitor.get_x() <= x + allocation.get_width() - menu_req.width) {
/* b) align menu right and button right */ /* b) align menu right and button right */
x += allocation.get_width() - menu_req.width; x += allocation.get_width() - menu_req.width;
} else if (menu_req.width > monitor.get_width()) { } else if (menu_req.width <= monitor.get_width()) {
/* c) align menu right and screen right, guaranteed to fit */ /* c) align menu right and screen right, guaranteed to fit */
x = monitor.get_x() + monitor.get_width() - menu_req.width; x = monitor.get_x() + monitor.get_width() - menu_req.width;
} else { } else {