[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - svtools/uiconfig vcl/uiconfig vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Jan 17 02:46:08 UTC 2021


 svtools/uiconfig/ui/combocontrol.ui    |    4 ++++
 svtools/uiconfig/ui/listcontrol.ui     |    3 +++
 svtools/uiconfig/ui/thineditcontrol.ui |    3 +++
 vcl/uiconfig/ui/combobox.ui            |    1 +
 vcl/unx/gtk3/gtk3gtkdata.cxx           |   13 +++++++++----
 vcl/unx/gtk3/gtk3gtkinst.cxx           |    4 ++++
 6 files changed, 24 insertions(+), 4 deletions(-)

New commits:
commit 0c5cf69cb123fea5b340d9c9b1a292df2efa61cb
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jan 15 15:34:21 2021 +0000
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun Jan 17 03:45:33 2021 +0100

    tdf#137695 shrink widget height below natural min within data browser
    
    Change-Id: Iba3c12376200b7ce800b48155a4b84ca2e47d63f
    
    Change-Id: Iba3c12376200b7ce800b48155a4b84ca2e47d63f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109350
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/svtools/uiconfig/ui/combocontrol.ui b/svtools/uiconfig/ui/combocontrol.ui
index e9a60df380f9..38a0d6af1206 100644
--- a/svtools/uiconfig/ui/combocontrol.ui
+++ b/svtools/uiconfig/ui/combocontrol.ui
@@ -16,8 +16,12 @@
           <object class="GtkEntry">
             <property name="truncate-multiline">True</property>
             <property name="can_focus">True</property>
+            <property name="has-frame">False</property>
           </object>
         </child>
+        <style>
+          <class name="small-button"/>
+        </style>
       </object>
       <packing>
         <property name="expand">True</property>
diff --git a/svtools/uiconfig/ui/listcontrol.ui b/svtools/uiconfig/ui/listcontrol.ui
index a9f2444e24ff..d633ec43d497 100644
--- a/svtools/uiconfig/ui/listcontrol.ui
+++ b/svtools/uiconfig/ui/listcontrol.ui
@@ -11,6 +11,9 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="hexpand">True</property>
+        <style>
+          <class name="small-button"/>
+        </style>
       </object>
       <packing>
         <property name="expand">True</property>
diff --git a/svtools/uiconfig/ui/thineditcontrol.ui b/svtools/uiconfig/ui/thineditcontrol.ui
index 095dc18e1985..fae64f377a13 100644
--- a/svtools/uiconfig/ui/thineditcontrol.ui
+++ b/svtools/uiconfig/ui/thineditcontrol.ui
@@ -46,6 +46,9 @@
             <property name="activates_default">True</property>
             <property name="truncate-multiline">True</property>
             <property name="width_chars">1</property>
+            <style>
+              <class name="small-button"/>
+            </style>
           </object>
           <packing>
             <property name="left_attach">0</property>
diff --git a/vcl/uiconfig/ui/combobox.ui b/vcl/uiconfig/ui/combobox.ui
index 2c25d7ac8620..23cfe7ed9e31 100644
--- a/vcl/uiconfig/ui/combobox.ui
+++ b/vcl/uiconfig/ui/combobox.ui
@@ -3,6 +3,7 @@
 <interface domain="vcl">
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkBox" id="box">
+    <property name="name">combobox</property>
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="no_show_all">True</property>
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index 58109aae148a..cef4b3e0d30c 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -522,14 +522,19 @@ void GtkSalData::Init()
                           G_CALLBACK(signalMonitorsChanged), GetGtkDisplay() );
 
         /*
-           set a provider to allow certain buttons to have no padding
+           set a provider to allow certain widgets to have no padding
 
            a) little close button in menubar to close back to start-center
-           b) small buttons in view->data sources
-           c) small toolbar button in infobars
+           b) and small buttons in view->data sources (button.small-button)
+           c) small toolbar button in infobars (toolbar.small-button button)
+           d) comboboxes in the data browser for tdf#137695 (box#combobox button.small-button,
+              which would instead be combobox button.small-button if we didn't replace GtkComboBox,
+              see GtkInstanceComboBox for an explanation for why we do that)
+           e) entry in the data browser for tdf#137695 (entry.small-button)
         */
         GtkCssProvider* pSmallButtonProvider = gtk_css_provider_new();
-        static const gchar data[] = "button.small-button, toolbar.small-button button { "
+        static const gchar data[] =
+          "button.small-button, toolbar.small-button button, combobox.small-button *.combo, box#combobox.small-button *.combo, entry.small-button { "
           "padding: 0;"
           "margin-left: 0px;"
           "margin-right: 0px;"
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 5b11fba37947..f29c0c018ad3 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -15170,6 +15170,10 @@ public:
         , m_nMaxMRUCount(0)
     {
         int nActive = gtk_combo_box_get_active(m_pComboBox);
+
+        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");
+
         insertAsParent(GTK_WIDGET(m_pComboBox), GTK_WIDGET(getContainer()));
         gtk_widget_set_visible(GTK_WIDGET(m_pComboBox), false);
         gtk_widget_set_no_show_all(GTK_WIDGET(m_pComboBox), true);


More information about the Libreoffice-commits mailing list