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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 7 11:39:40 UTC 2021


 svtools/uiconfig/ui/thineditcontrol.ui |    3 +++
 vcl/unx/gtk3/gtkdata.cxx               |    4 +++-
 vcl/unx/gtk3/gtkinst.cxx               |   22 ++++++++++++++++------
 3 files changed, 22 insertions(+), 7 deletions(-)

New commits:
commit bc3571887f5fa3abc6655400560fd0c0fd530528
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Oct 6 14:53:58 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Oct 7 13:39:06 2021 +0200

    Related: tdf#141633 similiarly support match spinbutton font size
    
    to the desired zoomed font size in the table control
    
    Change-Id: I9aafec5b9a236bf5d140fd9b8bfc9000c3f0bf35
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123147
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/svtools/uiconfig/ui/thineditcontrol.ui b/svtools/uiconfig/ui/thineditcontrol.ui
index e2258743f381..e839b02df82c 100644
--- a/svtools/uiconfig/ui/thineditcontrol.ui
+++ b/svtools/uiconfig/ui/thineditcontrol.ui
@@ -29,6 +29,9 @@
             <property name="vexpand">True</property>
             <property name="truncate-multiline">True</property>
             <property name="has_frame">False</property>
+            <style>
+              <class name="small-button"/>
+            </style>
           </object>
           <packing>
             <property name="left_attach">0</property>
diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index 86ea3a430875..98424d95e673 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -432,6 +432,7 @@ static GtkStyleProvider* CreateStyleProvider()
           which would instead be combobox button.small-button if we didn't replace GtkComboBox,
           see GtkInstanceComboBox for an explanation for why we do that)
        1.e) entry in the data browser for tdf#137695 (entry.small-button)
+       1.f) spinbutton in the data browser tdf#141633 (spinbutton.small-button)
 
        2) hide the unwanted active tab in an 'overflow' notebook of double-decker notebooks.
           (tdf#122623) it's nigh impossible to have a GtkNotebook without an active (checked) tab,
@@ -440,7 +441,8 @@ static GtkStyleProvider* CreateStyleProvider()
     GtkCssProvider* pStyleProvider = gtk_css_provider_new();
     static const gchar data[] =
       "button.small-button, toolbar.small-button button, box.small-button button, "
-      "combobox.small-button *.combo, box#combobox.small-button *.combo, entry.small-button { "
+      "combobox.small-button *.combo, box#combobox.small-button *.combo, entry.small-button, "
+      "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; }"
       "notebook.overflow > header.top > tabs > tab:checked { "
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index b033be801ff3..66cefee6b559 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -11877,8 +11877,8 @@ class GtkInstanceEditable : public GtkInstanceWidget, public virtual weld::Entry
 protected:
     GtkEditable* m_pEditable;
     GtkWidget* m_pDelegate;
-private:
     WidgetFont m_aCustomFont;
+private:
     gulong m_nChangedSignalId;
     gulong m_nInsertTextSignalId;
     gulong m_nCursorPosSignalId;
@@ -12133,11 +12133,6 @@ public:
         g_signal_handler_unblock(m_pDelegate, m_nActivateSignalId);
     }
 
-    virtual void set_font(const vcl::Font& rFont) override
-    {
-        m_aCustomFont.use_custom_font(&rFont, u"entry");
-    }
-
     virtual vcl::Font get_font() override
     {
         if (const vcl::Font* pFont = m_aCustomFont.get_custom_font())
@@ -12255,6 +12250,11 @@ public:
         : GtkInstanceEditable(GTK_WIDGET(pEntry), pBuilder, bTakeOwnership)
     {
     }
+
+    virtual void set_font(const vcl::Font& rFont) override
+    {
+        m_aCustomFont.use_custom_font(&rFont, u"entry");
+    }
 };
 
 }
@@ -15827,6 +15827,11 @@ public:
         return gtk_spin_button_get_digits(m_pButton);
     }
 
+    virtual void set_font(const vcl::Font& rFont) override
+    {
+        m_aCustomFont.use_custom_font(&rFont, u"spinbutton");
+    }
+
     virtual void disable_notify_events() override
     {
         g_signal_handler_block(m_pButton, m_nValueChangedSignalId);
@@ -16031,6 +16036,11 @@ public:
         enable_notify_events();
     }
 
+    virtual void set_font(const vcl::Font& rFont) override
+    {
+        m_aCustomFont.use_custom_font(&rFont, u"spinbutton");
+    }
+
     virtual void disable_notify_events() override
     {
         g_signal_handler_block(m_pButton, m_nValueChangedSignalId);


More information about the Libreoffice-commits mailing list