From 520b959d2dbc3487d93fcdacc23238bc2fcaf9d9 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Fri, 27 Mar 2026 09:25:28 -0400 Subject: [PATCH 1/2] fix: adjust combobox popup height calculation for better screen fitting --- patches/fix-combobox-popup-height-cap.patch | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 patches/fix-combobox-popup-height-cap.patch diff --git a/patches/fix-combobox-popup-height-cap.patch b/patches/fix-combobox-popup-height-cap.patch new file mode 100644 index 0000000..6a83aae --- /dev/null +++ b/patches/fix-combobox-popup-height-cap.patch @@ -0,0 +1,26 @@ +diff --git a/lib/src/style/eventFilters/ComboboxItemViewFilter.hpp b/lib/src/style/eventFilters/ComboboxItemViewFilter.hpp +index 62f628b..abc1234 100644 +--- a/lib/src/style/eventFilters/ComboboxItemViewFilter.hpp ++++ b/lib/src/style/eventFilters/ComboboxItemViewFilter.hpp +@@ -114,10 +114,17 @@ private: + // Height. + const auto absoluteMinHeight = qlementineStyle->theme().controlHeightLarge * (isTreeView ? 5 : 1); + const auto screen = view->screen(); +- const auto viewGlobalY = view->mapToGlobal(QPoint(0, 0)).y(); // Don't exceed the screen height when expanding a tree view. +- const auto absoluteMaxHeight = screen != nullptr ? +- screen->geometry().height() - 128 - viewGlobalY : +- qlementineStyle->theme().controlHeightLarge * 10; ++ const auto comboGlobalY = _comboBox->mapToGlobal(QPoint(0, 0)).y(); ++ const auto screenPadding = 128; ++ int absoluteMaxHeight; ++ if (screen != nullptr) { ++ const auto screenGeom = screen->availableGeometry(); ++ const auto spaceBelow = screenGeom.bottom() - comboGlobalY - _comboBox->height() - screenPadding; ++ const auto spaceAbove = comboGlobalY - screenGeom.top() - screenPadding; ++ absoluteMaxHeight = std::max(spaceBelow, spaceAbove); ++ } else { ++ absoluteMaxHeight = qlementineStyle->theme().controlHeightLarge * 10; ++ } + const auto height = std::min(absoluteMaxHeight, std::max(absoluteMinHeight, viewMinimumSizeHint().height())); + + view->setFixedWidth(width); From f1d50f757e23e0db82025f5cca00102a83cf84e1 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Fri, 27 Mar 2026 09:30:43 -0400 Subject: [PATCH 2/2] fix: improve combobox popup height calculation to better utilize screen space --- ...p-height-cap.patch => 163-fix-combobox-popup-height-cap.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename patches/{fix-combobox-popup-height-cap.patch => 163-fix-combobox-popup-height-cap.patch} (100%) diff --git a/patches/fix-combobox-popup-height-cap.patch b/patches/163-fix-combobox-popup-height-cap.patch similarity index 100% rename from patches/fix-combobox-popup-height-cap.patch rename to patches/163-fix-combobox-popup-height-cap.patch