From bc23214c2b9defa71401d4e58f8d59cdecafc839 Mon Sep 17 00:00:00 2001 From: Heiko Tietze Date: Tue, 16 Sep 2025 15:54:04 +0200 Subject: [PATCH] Resolves tdf#165474 - Ensure all items being visible on vertical tabs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I67704f702fb5dd9579d19a57c851d3c6f3129ed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191035 Reviewed-by: Caolán McNamara Reviewed-by: Heiko Tietze Tested-by: Jenkins --- vcl/unx/gtk3/gtkinst.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 50b254518221..abc230dd111a 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -9385,6 +9385,18 @@ public: // the unwanted tab into invisibility via the 'overflow' class themed by global CreateStyleProvider GtkStyleContext *pNotebookContext = gtk_widget_get_style_context(GTK_WIDGET(m_pOverFlowNotebook)); gtk_style_context_add_class(pNotebookContext, "overflow"); + + // tdf#165474 ensure all tabs are visible + if (gtk_notebook_get_tab_pos(pNotebook) != GTK_POS_TOP) + { + pNotebookContext = gtk_widget_get_style_context(GTK_WIDGET(pNotebook)); + GtkCssProvider* pProvider = gtk_css_provider_new(); + static const gchar data[] = "notebook > header > tabs > tab { padding-top: 1; " + "padding-bottom: 1; margin-top: 0; margin-bottom: 0;}"; + css_provider_load_from_data(pProvider, data, -1); + gtk_style_context_add_provider(pNotebookContext, GTK_STYLE_PROVIDER(pProvider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + } } virtual int get_current_page() const override