-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GTK+ 3.18/20/22: indicator-applet-complete doesn't follow panel's bg color #17
Comments
I also noticed that when no indicators are present, the label which tells us about it follows panel's bg color just fine. It can be reproduced by adding In the code the label is set as the bg widget, nothing special: if (indicators_loaded == 0) {
/* A label to allow for click through */
GtkWidget * item = gtk_label_new(_("No Indicators"));
#if GTK_CHECK_VERSION(3, 0, 0)
mate_panel_applet_set_background_widget(applet, item);
#endif
gtk_container_add(GTK_CONTAINER(applet), item);
gtk_widget_show(item);
} else {
gtk_container_add(GTK_CONTAINER(applet), menubar);
mate_panel_applet_set_background_widget(applet, menubar);
gtk_widget_show(menubar);
} So I don't get it why it works for a label but not for a menubar... |
I've not been able to make indicator-applet work at all on my Debian setup, On 7/8/2016 at 5:01 AM, "monsta" notifications@github.com wrote:
|
Which GTK 3 version is this? There were radical changes in custom background code forced by the GTK 3.20 transition that were also applied to GTK 3.18 builds as they reduced the applet crash problem. There were problems with backgrounds turning transparent which were a GtkPlug issue and required new code to put them in windows which then could be themed. This had to be used together with the code that moved the panel background handling to the toplevel to get consistant alpha values on transparent backgrounds. If this applet and only this applet is mismatching custom panel backgrounds, it makes me wonder if it missed some code changes. Were any parts of the libmate-panel-applet code duplicated in this applet rather than dynamically linked perhaps? As I said I've got no way to test this but I there is the possbility this is fallout from the panel background fixes forced by GTK 3.20. Current Ubuntu 16.04 LTS uses 3.18-and so does the alpha Yakkety version. This means the new panel code would be used. If you were to build the panel and applet against an older version of Ubuntu and try again you could rule these code changes in or out. If the same issue comes up with GTK 3.16 or 3.14 the panel BG code changes are not the problem as they are only applied to GTK 3.18 or later builds. If this makes the differennce the panel BG code changes are the issue and some part of that didn't make it to this applet or is being improperly used. I haven't seen or heard of any other applet acting like this and tested a bunch of them while I was working on that panel code. Unfortunately indicator-applet doesn't work at all on my Debian setup as no indicators can be found even if installed. |
I thought I'd chime in regarding this bug. It doesn't only seem to affect indicator-applet, but (in my case at least) window buttons and the clock. |
Window buttons and clock have never acted like that on my systems. On 7/8/2016 at 6:51 PM, "easdbe" notifications@github.com wrote:
|
This is with GTK+ 3.18 which is currently in Ubuntu 16.10. Only this applet behaves like that, and - see the code I quoted in my comment above - only when That |
AFAIK, no parts of libmate-panel-applet code are duplicated here. It's all done like in all the other panel applets, we only call |
Looks like this problem was inherited from GNOME. From comments under "Ok, so it's also broken in the original indicator-applet (for gnome-panel). On 7/13/2016 at 11:30 AM, "monsta" notifications@github.com wrote:
|
Yes, that's my comment there 😄 Indeed, the original indicator-applet running with gnome-panel 3.18 in gnome-flashback session (same system, Ubuntu 16.10) has the same issue. @albertsmuktupavels: maybe you could give a hint about this please? |
|
If the applet can be made transparent by modifying a theme, that means On 7/15/2016 at 9:29 AM, "Alberts Muktupāvels" notifications@github.com wrote:
|
Ok guys, you might be right about the themes... A few days ago Ubuntu 16.10 finally got GTK+ 3.20, and suddenly, I have transparent background in the indicators. Even though I did not rebuild mate-panel and mate-indicator-applet (they're still built against GTK+ 3.18), it works. Not with all themes though. It works with almost all themes from mate-themes package, except for two "Traditional" ones. |
Hmm... rebuilding both panel and indicator applet against 3.20 changed absolutely nothing. 😕 |
Indicator applet use GtkMenuBar. Most likely both themes set background color on menubar. https://code.launchpad.net/~albertsmuktupavels/ubuntu-themes/gnome-panel-3-20/+merge/302349 |
Themes issue for 3.20 is now tracked at https://github.com/flexiondotorg/ubuntu-mate-themes/issues/39. I'll leave this one open since we're going to stumble upon it in Mint 18.1 which has 3.18.9. |
Fixes the issue, or more general in gtk+-3.18 syntax. |
In my own theme, .mate-panel-menu-bar menubar{} (GTK3.20 syntax) is only used to deliberately override the use of .mate-panel.menu.bar to set to overall panel background, so as not to also set it again on the main menubar or similar applets. This sort of thing thus seems to come and go, at least GTK3 will now be stable and themes can thus also stabilize. Although I can't test the indicator applet, to get all applets to respect panel transparency in my own theme required deliberate attention to detail, the old UbuntuStudio-Legacy GTK2 theme did NOT leave all applets properly showing the panel background. If something causes problems in themes that do not refer to MATE at all, there is always the option of hardcoding it transparent as well. |
Testing with 3.18... Weird. Mint-X doesn't have this issue even though there are no "fast-user-switch" things in css files. At the same time, all mate-themes have this issue... |
@monsta
Add this to the end of mate-application.css. |
Hmm I thought it was already committed... anyway, I added this to Menta and TraditionalGreen, and nothing changed. |
Without looking into the code i would say they don't set 'menubar' in there css.
But why this applet draw his own background? |
Yeah now it works 👍 Well, the code looks like it should use bg from panel (see code snippets in the first post above). Apparently something goes wrong there. |
I added this to all branches. |
there is a bounty here, currently 10$ |
@monsta |
If its fixed by theming rather than hardcoding the necessary elements, it's not fixed in non-MATE themes a user might install. |
If the question is just bounty, you can claim it 😄 |
Well, the bounty is from mate-desktop itself, maybe someone like to remove the menubar style class from applet, this should fix the issue. |
The style class should stay on the menus popped up from the applet, or a mismatch will result in any theme that sets a mate-panel menu theme different from the overall GTK theme. Not a big deal to me as I use the tray's own SNI support rather than this applet. Speaking of that, what is in this applet that is not duplicated by the tray's native SNI support at this time? |
Clarification: the mate-panel-menu-bar style class needs to be on the menus popped up from the applet or on any parent widget to them, and when on an applet itself should make the applet look exactly the same as the main menu bar. That is, any lack of transparency on this applet that is not also a problem on the main menu bar has more to it. Use of the overall style class menubar rather than mate-panel-menu-bar , on the other hand, could cause exactly this problem and would NOT fix such a menu mismatch. EDIT: Removing it sounds like a good idea Having never worked on this applet (could not make it work when I tried, not on ubuntu), I have never worked on it so I would not have applied mate-panel-menu-bar to get menus to match those created by the main menu bar when the theme sets
|
This applet is just a container for indicator-application, indicator-sound and other kinds of indicators. Only indicator-application has functionality available in tray's SNI support. |
What can be removed from the code? The only style-related thing I found is:
But removing it doesn't fix the issue. It only makes the issue appear for the themes where it was fixed previously (e.g. TraditionalGreen). |
OK, this looks like the fix is to either apply .mate-panel-menu-bar to the applet so it will always match the styling of the main menu bar (which is normally transparent), or to hardcode the background transparent. The former is probably the way to go as it also ensure consistant menus, but I cannot test this as I am not on Ubuntu and my last attempt to build and run this failed. Otherwise I would take care of this myself. |
I also wonder why |
@lukefromdc: I've adapted indicator-application for Debian, it's in my repo. It includes I've enabled autostarting in MATE so that it would automatically load into mate-indicator-applet. You can disable it the usual way, via mate-session-properties. To make the applet actually show something, just run some app with appindicator support. To avoid any conflicts, it's better to disable tray's SNI support first. |
I was able to build and install mate-indicator-applet, and (from https://github.com/monsta/indicator-application ) indicator-application and with some fiddleing get my indicators into them. I found that I was unable to duplicate the non-transparent background issue however, in any theme including Adwaita. It just plain worked fine. I've got GTK 3.22.26 and mate-panel from current git master, if that's any indicator so to speak. |
Remove this part from /* mate-indicator-applet */
/* needed for a transparent panel */
#fast-user-switch-applet > #fast-user-switch-menubar {
background-color: transparent;
background-image: none;
} However, I don't know why the problem isn't reproducible with Adwaita, while it doesn't have any specific theming for this applet. 😕 |
I don't have that in my theme either and didn't see the problem there |
I've tested this modification with TraditionalGreen theme. |
I assume that the fix in themes is enough as nobody try to add a general fix in code. |
I just had this issue and it was very frustrating to figure out where to even put that CSS. Someone should definitely add the general fix. BTW the CSS bellow goes here /* mate-indicator-applet */
/* needed for a transparent panel */
#fast-user-switch-applet > #fast-user-switch-menubar {
background-color: transparent;
background-image: none;
} |
Originally reported at https://bugs.launchpad.net/bugs/1598159:
Indeed, I can reproduce it in Ubuntu 16.10 which has GTK+3 build of MATE 1.14 now.
Here's how indicator-sound and indicator-messages look with transparent panel and TraditionalGreen theme:
@raveit65 @lukefromdc @dnk @XRevan86
Guys, I need some help with this. I know that probably only @XRevan86 might be able to test this applet... but maybe you guys have some ideas that I could try.
So far, I've tried not to use some deprecated stuff in GTK+3 build (see 0c50584). Also I've tried to use the applet as the second argument of
mate_panel_applet_set_background_widget
function (like it's done in all other applets):None of this helped. I still can't make it follow panel's bg color. 😕
The text was updated successfully, but these errors were encountered: