summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jones <matthewbjones85@gmail.com>2021-06-02 17:30:33 -0600
committerAndreas Kling <kling@serenityos.org>2021-06-03 08:23:45 +0200
commit36a1162eb8e078305aefdcd66a901c8df42c824b (patch)
tree02bc5410be792f898b855c8ab90a914f9cbf9db6
parent6c520fab878d4af1ad69fa56b34c89320121f959 (diff)
downloadserenity-36a1162eb8e078305aefdcd66a901c8df42c824b.zip
LibGUI: ComboBox now correctly sizes height in relation to taskbar
-rw-r--r--Userland/Libraries/LibGUI/ComboBox.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGUI/ComboBox.cpp b/Userland/Libraries/LibGUI/ComboBox.cpp
index fa676520b3..4814e49153 100644
--- a/Userland/Libraries/LibGUI/ComboBox.cpp
+++ b/Userland/Libraries/LibGUI/ComboBox.cpp
@@ -225,11 +225,8 @@ void ComboBox::open()
};
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 };
- 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);
if (m_selected_index.has_value()) {