! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Gtk3 Plugins] Bug 10561 issues
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Libxfce4panel

Comments

Description ria.freelander 2015-03-09 08:39:03 CET
Created attachment 6056 
Screen of bug

For now, background color is drawn twice on panel. I will try to fix it. 
Screen:
Comment 1 ria.freelander 2015-03-09 10:47:24 CET
Created attachment 6057 
Fix for bug

Gtk3 renders themed background under a colored background. So, I set background-color for widget to transparent for rendering.
Comment 2 ria.freelander 2015-03-09 10:59:29 CET
Created attachment 6058 
Fix for bug

Render themed widget background as transparent always to avoid double-painting
Comment 3 Simon Steinbeiss editbugs 2015-04-03 09:49:17 CEST
Hi,
to be frank, this all looks a bit cumbersome and complicated.
Be that as it may, I don't think we should change the current behavior for any of the subsequent 4.12.x releases and for 4.14 we will have a full Gtk3 panel, so I think whenever we work on porting the panel, this will be one of the things to consider.
(For reference, this is how you correctly theme the panel at the moment: https://github.com/shimmerproject/Greybird/blob/master/gtk-3.0/apps/xfce.css#L44)

I haven't tested your patch yet, but how does the additional transparency on the widget itself interact with the panel's internal transparency/background-color setting? (in panel-preferences -> appearance)
Comment 4 Andrzej editbugs 2015-04-03 11:48:35 CEST
I can't reproduce this issue with Greybird or Adwaita but was able to see it in Raleigh (background transparency only, opacity works fine). But since Raleigh is Gtk2 only it is not supported by the Gtk3 panel.

Simon is the current mechanism guaranteed to work with all themes supporting Gtk3? Or do they still need extra code to make the transparency work?
Comment 5 ria.freelander 2015-04-03 11:55:24 CEST
1. This is a bugfix.
2. I test it with paper-gtk-theme (it is buggy) and with numix (it is also buggy). With adwaita all are OK now. Greybird also buggy without my patch, but if plugin is not button.


.xfce4-panel {
    background-color: shade(@panel_bg_color, 0.35);
    color: @panel_fg_color;
    font: normal;
}


do this code works with opacity without my patch? (set opacity to 20% for example)?
Comment 6 ria.freelander 2015-04-03 11:56:29 CEST
Sorry for double-post, but with greybird it is also buggy event with buttons, if I try to set fully transparent panel.
Comment 7 Simon Steinbeiss editbugs 2015-04-03 13:00:07 CEST
Greybird, Numix, Adwaita and HighContrast all work fine with the gtk2 panel with gtk3 panel plugins (which are all buttons for me, so I'm not sure how anything else would be handled).

Could you be a bit more specific as to what exactly is "buggy"?

@Andrzejr: If it works fine with Adwaita (which doesn't hold any extra code for xfce), it should be fine with everything. Note though that we currently do some css magic in the plugins themselves to make them behave correctly. But yeah, as I said, imo this really should be discussed in the context of a Gtk3-only panel.
Comment 8 ria.freelander 2015-04-03 13:14:02 CEST
Created attachment 6164 
Greybird bug non-buttons

This is Gtk3 Menubar
Comment 9 Andrzej editbugs 2015-04-03 13:18:20 CEST
What is this plugin?
Comment 10 Simon Steinbeiss editbugs 2015-04-03 13:22:41 CEST
Please try to be a little more verbose and explanatory. What plugin are you using, where can we get it from, etc.

Is this the topmenu plugin (or whatever it is called)?

FWIW, I noticed this issue as well but from what I can tell the problem is that this is a menubar, so it picks up the theming from GtkMenubar (however it is defined in the theme). From as much as I've looked into it (haven't read the source of topmenu though), this should be fixed in the plugin. Or are you saying that your patch fixes https://gitorious.org/projects/topmenu/issues/6 ?
Comment 11 ria.freelander 2015-04-03 13:47:57 CEST
No, this is vala-panel-appmenu-xfce, it is pure Gtk3 menu. I check it in a plugin side and added a simple hack, but this is not sufficient. I will see it in a plugin side. Yes, it picks theming from GtkMenuBar. But some themes is not picks up colors...
Comment 12 ria.freelander 2015-04-03 13:57:06 CEST
Created attachment 6165 
No issues wit Numix

MenuBar is greybird-specific.
Comment 13 Simon Steinbeiss editbugs 2015-04-03 14:31:00 CEST
That doesn't really count. Numix only works by chance, because it uses the same color for the panel's and the GtkMenubar background.
Comment 14 ria.freelander 2015-04-03 15:16:41 CEST
Maybe. But I think this is themes issue. Theme creator can write some like
this
.xfce4-panel GtkMenuBar {
    background-color: transparent;
    color: @panel_fg_color;
}

It cannot be fixed on panel side or on my (plugin) side.
Comment 15 Simon Steinbeiss editbugs 2015-04-04 13:39:23 CEST
You can load this css in the plugin, so yes, it should definitely be fixable in the plugin (which would be the desired solution, since it should work ootb with standard themes like Adwaita).

But yeah, ofc it could also be added as workarounds in themes.
Comment 16 Andrzej editbugs 2015-04-04 17:22:25 CEST
Simon, since you have the most experience with theming please decide whether this should be fixed in the plugin or if I should apply the patch.

As long as there are no side effects that would cause problems now or later (e.g. with gtk3-only panel) I have no problem with applying this patch to 4.12.x.
Comment 17 Simon Steinbeiss editbugs 2015-04-07 14:14:15 CEST
(In reply to Andrzej from comment #16)
> Simon, since you have the most experience with theming please decide whether
> this should be fixed in the plugin or if I should apply the patch.
> 
> As long as there are no side effects that would cause problems now or later
> (e.g. with gtk3-only panel) I have no problem with applying this patch to
> 4.12.x.

For the moment I don't see any need to apply this patch. The only problematic plugins are those using a menubar and for those the theming should be fixed in the plugins (i.e. it has to work with Adwaita out of the box and without modifications, like the indicator-plugin or others do).

For 4.14 I would re-think how we apply theming from the panel downwards to the plugins, but that's a different story entirely.
Comment 18 Simon Steinbeiss editbugs 2018-12-04 00:48:06 CET
Marking this as fixed for now.

Bug #11666

Reported by:
ria.freelander
Reported on: 2015-03-09
Last modified on: 2018-12-04

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Version:
4.12.0

Attachments

Screen of bug (9.21 KB, image/png)
2015-03-09 08:39 CET , ria.freelander
no flags
Fix for bug (1.53 KB, patch)
2015-03-09 10:47 CET , ria.freelander
no flags
Fix for bug (1.76 KB, patch)
2015-03-09 10:59 CET , ria.freelander
no flags
Greybird bug non-buttons (15.83 KB, image/png)
2015-04-03 13:14 CEST , ria.freelander
no flags
No issues wit Numix (51.26 KB, image/png)
2015-04-03 13:57 CEST , ria.freelander
no flags

Additional information