From dbf3eba5514f0ed48683e2b58ac56c96b6d48792 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 9 Jun 2020 20:32:52 +0100 Subject: Resolves: tdf#132540 theme the unwanted popover into invisibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If18c5c1de40a4f93d062265d41a2bff72555d6c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95964 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- vcl/unx/gtk3/gtk3gtkinst.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vcl/unx') diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 6d692f76405d..058bdfb38e4c 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -7415,6 +7415,15 @@ public: { GtkWidget* pPlaceHolder = gtk_popover_new(GTK_WIDGET(m_pMenuButton)); gtk_popover_set_transitions_enabled(GTK_POPOVER(pPlaceHolder), false); + + // tdf#132540 theme the unwanted popover into invisibility + GtkStyleContext *pPopoverContext = gtk_widget_get_style_context(pPlaceHolder); + GtkCssProvider *pProvider = gtk_css_provider_new(); + static const gchar data[] = "popover { box-shadow: none; padding: 0 0 0 0; margin: 0 0 0 0; border-image: none; border-image-width: 0 0 0 0; background-image: none; background-color: transparent; border-radius: 0 0 0 0; border-width: 0 0 0 0; border-style: none; border-color: transparent; opacity: 0; min-height: 0; min-width: 0; }"; + gtk_css_provider_load_from_data(pProvider, data, -1, nullptr); + gtk_style_context_add_provider(pPopoverContext, GTK_STYLE_PROVIDER(pProvider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + gtk_menu_button_set_popover(m_pMenuButton, pPlaceHolder); } else -- cgit