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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 9 20:19:09 UTC 2020


 vcl/unx/gtk3/gtk3gtkinst.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 181587f3a3f8d05f1a3c82eaa0a8838db0096358
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 9 20:32:52 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 9 22:18:33 2020 +0200

    Resolves: tdf#132540 theme the unwanted popover into invisibility
    
    Change-Id: If18c5c1de40a4f93d062265d41a2bff72555d6c1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95973
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 41bd249076c3..7c968124ad18 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -7410,6 +7410,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


More information about the Libreoffice-commits mailing list