mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
WindowServer: Position popup menu with offset of 1 pixel
This commit is contained in:
parent
a4f320c76b
commit
b0682a73ee
1 changed files with 2 additions and 0 deletions
|
@ -588,6 +588,8 @@ void Menu::do_popup(const Gfx::IntPoint& position, bool make_input, bool as_subm
|
|||
|
||||
if (adjusted_pos.x() + window.width() >= Screen::the().width() - margin) {
|
||||
adjusted_pos = adjusted_pos.translated(-window.width(), 0);
|
||||
} else {
|
||||
adjusted_pos.set_x(adjusted_pos.x() + 1);
|
||||
}
|
||||
if (adjusted_pos.y() + window.height() >= Screen::the().height() - margin) {
|
||||
adjusted_pos = adjusted_pos.translated(0, -min(window.height(), adjusted_pos.y()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue