cui/uiconfig/ui/numberingoptionspage.ui | 11 +++++++++++ vcl/unx/gtk3/gtkdata.cxx | 3 +++ vcl/unx/gtk3/gtkinst.cxx | 2 ++ 3 files changed, 16 insertions(+)
New commits: commit db2a7489fa7ac758c1ab35f49fff284f460c5d4c Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Jul 19 11:31:21 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Jul 19 17:53:36 2024 +0200 Resolves: tdf#161662 use some hackery to bring bullet combobox height down There are some Arabic, etc numbering options in there that cause gtk to allocate a large odd-looking height for the combobox. What we can try is to remove top/bottom padding for this widget, but then sync it with a sizegroup to another combobox and then it gets a more natural looking height. Change-Id: Idecbb3ee7b61fe55805d26cabdbaf1885574b3cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170751 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/cui/uiconfig/ui/numberingoptionspage.ui b/cui/uiconfig/ui/numberingoptionspage.ui index 84da7e34bdcd..c63a0a45efda 100644 --- a/cui/uiconfig/ui/numberingoptionspage.ui +++ b/cui/uiconfig/ui/numberingoptionspage.ui @@ -268,6 +268,10 @@ <property name="AtkObject::accessible-description" translatable="yes" context="numberingoptionspage|extended_tip|numfmtlb">Select a numbering scheme for the selected levels.</property> </object> </child> + <style> + <!-- tdf#161662 try and shrink this height to min and then use the size-group with charstyle to bring it back up to that height --> + <class name="novertpad"/> + </style> </object> <packing> <property name="left-attach">1</property> @@ -859,4 +863,11 @@ </packing> </child> </object> + <object class="GtkSizeGroup" id="sizegroup1"> + <property name="mode">vertical</property> + <widgets> + <widget name="charstyle"/> + <widget name="numfmtlb"/> + </widgets> + </object> </interface> diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx index 4c97e74aec01..17ae4ec928b8 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -459,6 +459,9 @@ static GtkStyleProvider* CreateStyleProvider() "spinbutton.small-button, spinbutton.small-button entry, spinbutton.small-button button { " "padding: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0;" "border-width: 0; min-height: 0; min-width: 0; }" + // tdf#161662 the bullet list is too tall with the Arabic text in it, remove its vert padding + "combobox.novertpad *.combo, box#combobox.novertpad *.combo { " + "padding-top: 0; padding-bottom: 0; }" #if GTK_CHECK_VERSION(4, 0, 0) // we basically assumed during dialog design that the frame's were invisible, because // they used to be in the default theme during gtk3 diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 179e29d250f9..df7b939f39ae 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -22212,6 +22212,8 @@ public: if (gtk_style_context_has_class(gtk_widget_get_style_context(GTK_WIDGET(m_pComboBox)), "small-button")) gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(getContainer())), "small-button"); + if (gtk_style_context_has_class(gtk_widget_get_style_context(GTK_WIDGET(m_pComboBox)), "novertpad")) + gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(getContainer())), "novertpad"); if (gtk_widget_get_has_tooltip(GTK_WIDGET(m_pComboBox))) {