diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-06 14:53:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-06 16:55:20 +0200 |
commit | 50a1b6e18ee51aee479495039aba3fdede2711ce (patch) | |
tree | 97413e2cf65c45f6179c3dbf7f67e61995676c42 | |
parent | e7ec79fe36a0f22f10167806da80e3c1f30b36e8 (diff) |
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/+/123142
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | svtools/uiconfig/ui/thineditcontrol.ui | 3 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkdata.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 22 |
3 files changed, 22 insertions, 7 deletions
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 26fb4328c6cd..c1381fe89daf 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -446,6 +446,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, @@ -454,7 +455,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 8f116ab36523..762870b912ac 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -12263,8 +12263,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; @@ -12519,11 +12519,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()) @@ -12641,6 +12636,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"); + } }; } @@ -16200,6 +16200,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); @@ -16404,6 +16409,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); |