[office/kmymoney] kmymoney/dialogs/settings: Fix the clipped content and horizontal scroll bar on the schedules settings page
Thomas Baumgart <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 5b14b9f18bf1e310620c4250f551672d623b2740 by Thomas Baumgart, on behalf of Simone Iori.
Committed on 27/07/2026 at 19:22.
Pushed by tbaumgart into branch 'master'.
Fix the clipped content and horizontal scroll bar on the schedules settings page
The "Scheduled transactions" page of the settings dialog is clipped on
the right and shows a horizontal scroll bar. I noticed it on Windows 11,
but the cause is platform independent.
A combo box whose minimumContentsLength is 0 reports the width of its
widest entry as its own minimum width. m_holidayRegion is filled from
KHolidays, whose descriptions are long, so the page ends up asking for a
minimum width no other page of the dialog needs. KConfigDialog keeps
every page in a QScrollArea, so the page does not widen the dialog: it
is clipped and gets a scroll bar instead. That happens even when the
dialog is at its own minimum width, so the page cannot be seen
completely without enlarging the dialog by hand.
The commit gives the combo box a minimum contents length and lets
it expand into the space the page has available, so the list of regions
no longer influences the width of the page.
It also contains a cosmetic change: the spin box for the number of
days in advance is the last widget of its row and therefore stretches
over the whole page, so it gets a trailing spacer like the other spin
box of the page; and the spacer of the region row still carries the
size hint it was given in Designer ages ago, which makes the page ask
for space it does not use.
M +29 -1 kmymoney/dialogs/settings/ksettingsschedules.ui
https://invent.kde.org/office/kmymoney/-/commit/5b14b9f18bf1e310620c4250f551672d623b2740
diff --git a/kmymoney/dialogs/settings/ksettingsschedules.ui b/kmymoney/dialogs/settings/ksettingsschedules.ui
index 42dce4688..f2224f7ea 100644
--- a/kmymoney/dialogs/settings/ksettingsschedules.ui
+++ b/kmymoney/dialogs/settings/ksettingsschedules.ui
@@ -59,6 +59,22 @@
</property>
</widget>
</item>
+ <item>
+ <spacer name="dayCountSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>41</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
</item>
@@ -86,6 +102,18 @@
</item>
<item>
<widget class="KComboBox" name="m_holidayRegion">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="sizeAdjustPolicy">
+ <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
+ </property>
+ <property name="minimumContentsLength">
+ <number>15</number>
+ </property>
<item>
<property name="text">
<string comment="@item no holiday region selected">(None)</string>
@@ -103,7 +131,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>282</width>
+ <width>41</width>
<height>17</height>
</size>
</property>