diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-09 20:32:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-09 22:18:11 +0200 |
commit | dbf3eba5514f0ed48683e2b58ac56c96b6d48792 (patch) | |
tree | d8a9621a35b2929f309c2f00c8950cd075a9d42c /vcl/unx | |
parent | 93f2cb69575df5b4a9e2c509ee2b691dc013045d (diff) |
Resolves: tdf#132540 theme the unwanted popover into invisibility
Change-Id: If18c5c1de40a4f93d062265d41a2bff72555d6c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95964
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
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 |