mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 19:46:03 +00:00
LibGUI: ComboBox now correctly sizes height in relation to taskbar
This commit is contained in:
parent
6c520fab87
commit
36a1162eb8
Notes:
sideshowbarker
2024-07-18 16:58:30 +09:00
Author: https://github.com/matthewbjones
Commit: 36a1162eb8
Pull-request: https://github.com/SerenityOS/serenity/pull/7715
1 changed files with 1 additions and 4 deletions
|
@ -225,11 +225,8 @@ void ComboBox::open()
|
||||||
};
|
};
|
||||||
|
|
||||||
auto taskbar_height = GUI::Desktop::the().taskbar_height();
|
auto taskbar_height = GUI::Desktop::the().taskbar_height();
|
||||||
// NOTE: This is so the combobox bottom edge exactly fits the taskbar's
|
|
||||||
// top edge - the value was found through trial and error though.
|
|
||||||
auto offset = 8;
|
|
||||||
Gfx::IntRect list_window_rect { my_screen_rect.bottom_left(), size };
|
Gfx::IntRect list_window_rect { my_screen_rect.bottom_left(), size };
|
||||||
list_window_rect.intersect(Desktop::the().rect().shrunken(0, taskbar_height + offset));
|
list_window_rect.intersect(Desktop::the().rect().shrunken(0, taskbar_height * 2));
|
||||||
|
|
||||||
m_editor->set_focus(true);
|
m_editor->set_focus(true);
|
||||||
if (m_selected_index.has_value()) {
|
if (m_selected_index.has_value()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue