| Summary: | [GTK3] Tool item buttons switch to whiter background if dialog is opened | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lars Vogel <Lars.Vogel> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | akurtakov, arunkumar.thondapu, chandrayya.gk, ericwill, gallyamb, gautier.desaintmartinlacaze, jkopriva, Lars.Vogel, pablofer72, peter, psuzzi |
| Version: | 4.5 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=421836 https://git.eclipse.org/r/87592 https://bugs.eclipse.org/bugs/show_bug.cgi?id=515004 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 497562 | ||
| Attachments: | |||
Can this be addressed for Mars? It looks relatively bad and a bit scary, as it feels like a lot of eyes looking suddenly at me. ;-) Created attachment 253374 [details]
Screenshot with GTK theme
Also happen with the "normal" GTK theme, its just a bit harder to see.
Seems specific to either the newer GTK+ version on Ubuntu 15.04 or the theme being used by Unity desktop, I don't see this on Ubuntu 12.04 or 14.04 either with Eclipse's Dark theme or GTK theme. Lars, can you try out with other desktop themes if possible to confirm? Leo, do you see this behavior on any of your Fedora installs? Created attachment 253381 [details]
Dark theme on Ubuntu 14.04
Looks good on Ubuntu 14.04.
Created attachment 253382 [details]
Dark theme on Ubuntu 14.04
Meant to attach this screenshot with Preferences dialog open.
Lars, this screenshot also shows the problem I mentioned in bug 465911, the project explorer shows two projects decorated with '>' by EGit but they are not highlighted in blue, instead they are in grey and almost invisible... (In reply to Arun Thondapu from comment #6) > Lars, this screenshot also shows the problem I mentioned in bug 465911, the > project explorer shows two projects decorated with '>' by EGit but they are > not highlighted in blue, instead they are in grey and almost invisible... For Git can you try the latest version from the nightly update site, Fabio and I contributed recently a few patches to them to make them work better in the dark theme, maybe this helps. (In reply to Arun Thondapu from comment #3) > Seems specific to either the newer GTK+ version on Ubuntu 15.04 or the theme > being used by Unity desktop, I don't see this on Ubuntu 12.04 or 14.04 > either with Eclipse's Dark theme or GTK theme. Lars, can you try out with > other desktop themes if possible to confirm? 14.04 and 14.10 worked fine, must be something related to the Ubuntu 15.04 GTK version. Lars, I currently am not on Ubuntu 15.04, I test mostly on Ubuntu 14.04, 12.04 and RHEL 7.1. It doesn't look like I'll get to this in time for 4.5, so unless someone else wants to work on this right now, this will have to be investigated for 4.6 with a chance to backport to 4.5.1. (In reply to Arun Thondapu from comment #9) > Lars, I currently am not on Ubuntu 15.04, I test mostly on Ubuntu 14.04, > 12.04 and RHEL 7.1. It doesn't look like I'll get to this in time for 4.5, > so unless someone else wants to work on this right now, this will have to be > investigated for 4.6 with a chance to backport to 4.5.1. Maybe Leo or Alexander can have a look? This is really annoying for the usage of Eclipse under Ubuntu 15.04 and I assume more and more people will migrate to it or a later version of Ubuntu over time. Created attachment 253403 [details]
Screenshot
On ubuntu 15.04 - installed gnome-themes-standard, switched gtk theme to Adwaita via gnome-tweak-tool and problem is not there. See https://bugs.eclipse.org/bugs/attachment.cgi?id=253403 . This points that the problem is theme problem and there isn't much we can do on SWT side, please report the issue to Ubuntu Ambience GTK theme. Looks like for eclipse mars Ambience will be problematic theme much like oxygen was for luna. (In reply to Alexander Kurtakov from comment #12) > On ubuntu 15.04 - installed gnome-themes-standard, switched gtk theme to > Adwaita via gnome-tweak-tool and problem is not there. See > https://bugs.eclipse.org/bugs/attachment.cgi?id=253403 . This points that > the problem is theme problem and there isn't much we can do on SWT side, > please report the issue to Ubuntu Ambience GTK theme. > Looks like for eclipse mars Ambience will be problematic theme much like > oxygen was for luna. If I start with GTK2 the problem is not there. Does that not imply a problem with GTK3 SWT? (In reply to Lars Vogel from comment #13) > (In reply to Alexander Kurtakov from comment #12) > > On ubuntu 15.04 - installed gnome-themes-standard, switched gtk theme to > > Adwaita via gnome-tweak-tool and problem is not there. See > > https://bugs.eclipse.org/bugs/attachment.cgi?id=253403 . This points that > > the problem is theme problem and there isn't much we can do on SWT side, > > please report the issue to Ubuntu Ambience GTK theme. > > Looks like for eclipse mars Ambience will be problematic theme much like > > oxygen was for luna. > > If I start with GTK2 the problem is not there. Does that not imply a problem > with GTK3 SWT? No, GTK2 and GTK3 themes share nothing. And the problem only appears with Ambience theme according to my testing and works fine with other GTK3 themes. Lars, is this still reproducible? After Eric's patches to have all the foreground/background work going through Gtk CSS machinery the issue should be done now.. (In reply to Alexander Kurtakov from comment #15) > Lars, is this still reproducible? After Eric's patches to have all the > foreground/background work going through Gtk CSS machinery the issue should > be done now.. Still there on GTK 3.16 (Ubuntu 15.10) (In reply to Lars Vogel from comment #16) > (In reply to Alexander Kurtakov from comment #15) > > Lars, is this still reproducible? After Eric's patches to have all the > > foreground/background work going through Gtk CSS machinery the issue should > > be done now.. > > Still there on GTK 3.16 (Ubuntu 15.10) Still the same with org.eclipse.swt.internal.gtk.version=3.18.9 and Ubuntu 16.04. Assigning Eric, because AFAIK his fix should have solved that for GTK 3.18 This happens on both themes of Ubuntu: Radiance and Ambiance What about Adwaita? Having results with Adwaita(as it's shipped with gtk upstream) is like having results with themes shipped with Eclipse platform. Created attachment 261323 [details]
Demonstrates the lighter button in the GTK theme of Eclipse
This bug is not only visible in the dark theme, you can also observe it in the normal GTK theme. See attached screenshot.
(In reply to Alexander Kurtakov from comment #19) > What about Adwaita? Having results with Adwaita(as it's shipped with gtk > upstream) is like having results with themes shipped with Eclipse platform. IIRC from Erics analysis on Fosscon, the error was independent of the theme, it had to do with the CSS classes using to configure the styling. I suggest to wait for Erics analysis, especially as I did not find a way via Google to install the Adwaita theme for Ubuntu 16.04. (In reply to Lars Vogel from comment #21) > (In reply to Alexander Kurtakov from comment #19) > > What about Adwaita? Having results with Adwaita(as it's shipped with gtk > > upstream) is like having results with themes shipped with Eclipse platform. > > IIRC from Erics analysis on Fosscon, the error was independent of the theme, > it had to do with the CSS classes using to configure the styling. I suggest > to wait for Erics analysis, especially as I did not find a way via Google to > install the Adwaita theme for Ubuntu 16.04. Installing should be a matter of apt-get install gnome-themes-standard. I would be really surprised if this issue is theme independent though. For me this is themes setting some weird colors aggressively for GTK_STATE_FLAG_BACKDROP widgets, state that is not t hit enter by mistake, continuing: ... state that is never touched by SWT as it would open another can of worms. (In reply to Alexander Kurtakov from comment #22) > Installing should be a matter of apt-get install gnome-themes-standard. Thanks. I can confirm that Adwaita does not have this problem. Given that Ubuntu is a very popular desktop system it would be great if that can be fixed on the SWT side, Ubuntu seems not to react on such reported issues. Or we can enforce GTK_THEME=Adwaita like we enforce other variables to stop Ubuntu specific problems and add a check that gnome-themes-standard is available in the launcher. Sounds easier for me to be achieved. (In reply to Alexander Kurtakov from comment #25) > Or we can enforce GTK_THEME=Adwaita like we enforce other variables to stop > Ubuntu specific problems and add a check that gnome-themes-standard is > available in the launcher. Sounds easier for me to be achieved. This would make Eclipse look even weirder on a standard Ubuntu. Maybe we can again ask Mike to contact the Ubuntu team to solve this issue together? As you are the SWT expert it would be great if you could trigger that. Nothing happened previous time why do you think it will happen now? Solution for Ubuntu users `apt-get install gnome-themes-standard gnome-shell`. Log out, log into gnome-shell, switch theme to Adwaita - no issues :). (In reply to Alexander Kurtakov from comment #27) > Nothing happened previous time why do you think it will happen now? Solution > for Ubuntu users `apt-get install gnome-themes-standard gnome-shell`. Log > out, log into gnome-shell, switch theme to Adwaita - no issues :). AFAIR the one time we contact Ubuntu directly they help us solving the issue. Since you are still experiencing this after the CSS patches to SWT I would say this is an Ubuntu issue. My guess is that Adwaita defines some sort of background color for inactive/unfocused toolbuttons and it is either different or not defined at all for Ubuntu/Ambiance/Radiance. (In reply to Eric Williams from comment #29) > Since you are still experiencing this after the CSS patches to SWT I would > say this is an Ubuntu issue. > > My guess is that Adwaita defines some sort of background color for > inactive/unfocused toolbuttons and it is either different or not defined at > all for Ubuntu/Ambiance/Radiance. My apologies I've got it backwards: I think it's the opposite. Adwaita doesn't define a color and Ubuntu does. Hence an insensitive/unfocused toolbutton looks the same on Adwaita as a focused one, where on Ubuntu it takes on a different color. (In reply to Eric Williams from comment #30) > (In reply to Eric Williams from comment #29) > > Since you are still experiencing this after the CSS patches to SWT I would > > say this is an Ubuntu issue. > > > > My guess is that Adwaita defines some sort of background color for > > inactive/unfocused toolbuttons and it is either different or not defined at > > all for Ubuntu/Ambiance/Radiance. > > My apologies I've got it backwards: I think it's the opposite. Adwaita > doesn't define a color and Ubuntu does. Hence an insensitive/unfocused > toolbutton looks the same on Adwaita as a focused one, where on Ubuntu it > takes on a different color. Not sure if that is relevant but this bug is only present in GTK3. (In reply to Lars Vogel from comment #31) > > My apologies I've got it backwards: I think it's the opposite. Adwaita > > doesn't define a color and Ubuntu does. Hence an insensitive/unfocused > > toolbutton looks the same on Adwaita as a focused one, where on Ubuntu it > > takes on a different color. > > Not sure if that is relevant but this bug is only present in GTK3. Lars, as mentioned by Alex already in comment 14, this is because Ambiance's GTK3 theme itself exhibits this behaviour whereas the GTK2 theme does not, so it still is a problem with the theme. Have you tried using the dark version of the Ambiance theme itself? I'm not sure if that would look better but it should definitely be worth a try IMO. Please also report the bug to Ubuntu/Ambiance and lets see how they respond. In any case, I don't think we can decide what needs to be done here for 4.6 RC1, I'm deferring the bug to 4.7 accordingly (Eric, I assume you agree?) (In reply to Arun Thondapu from comment #32) > Lars, as mentioned by Alex already in comment 14, this is because Ambiance's > GTK3 theme itself exhibits this behaviour whereas the GTK2 theme does not, > so it still is a problem with the theme. > > Have you tried using the dark version of the Ambiance theme itself? I'm not > sure if that would look better but it should definitely be worth a try IMO. As far as I know, Ubuntu does not ship a dark variant of the Ambiance theme. I've filed a bug with them for this issue but haven't heard anything back: https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1574822 > Please also report the bug to Ubuntu/Ambiance and lets see how they respond. > > In any case, I don't think we can decide what needs to be done here for 4.6 > RC1, I'm deferring the bug to 4.7 accordingly (Eric, I assume you agree?) Yes, there isn't anything we can do on the SWT end of things. OS specific theme problems isn't a case we can handle. (In reply to Eric Williams from comment #33) > As far as I know, Ubuntu does not ship a dark variant of the Ambiance theme. > I've filed a bug with them for this issue but haven't heard anything back: > https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1574822 I found this third party link which describes how to install the Ambiance dark theme but (a) I don't think its officially from Ubuntu (though the page mentions that this is created by an Ubuntu team), and (b) I've no idea whether it works on the recent versions of Ubuntu like 15.10 or 16.04. Regardless, I wanted to mention it as an FYI in case someone is interested in trying it out for themselves... (In reply to Arun Thondapu from comment #34) > I found this third party link which describes how to install the Ambiance > dark theme but (a) I don't think its officially from Ubuntu (though the page > mentions that this is created by an Ubuntu team), and (b) I've no idea > whether it works on the recent versions of Ubuntu like 15.10 or 16.04. > > Regardless, I wanted to mention it as an FYI in case someone is interested > in trying it out for themselves... Ah yeah I found that link as well. It looks old, but could probably still work for GTK3.16/18 if anyone wants to try. *** Bug 494389 has been marked as a duplicate of this bug. *** I tested with Adawaita and the background issue is gone, but there is still some refresh issue. please, see this video: https://www.youtube.com/watch?v=VqtmZDAfvhI Ubuntu 15.10 Eclipse Neon (4.6) RC2 - Build id: I20160519-1730 org.eclipse.swt.internal.gtk.version=3.16.7 (In reply to Patrik Suzzi from comment #37) > I tested with Adawaita and the background issue is gone, > but there is still some refresh issue. > please, see this video: https://www.youtube.com/watch?v=VqtmZDAfvhI > > > Ubuntu 15.10 > Eclipse Neon (4.6) RC2 - Build id: I20160519-1730 > org.eclipse.swt.internal.gtk.version=3.16.7 which app do you use to switch the theme? is it possible it also tries to switch the icon theme and it fails due to adwaita icon theme not being installed on your machine? I'm just wild guessing. Does it also happen when eclipse is started with adwaita theme and not dynamically switching? (In reply to Alexander Kurtakov from comment #38) > which app do you use to switch the theme? "unity tweak tool". IIRC is preinstalled in Ubuntu 15.10. I choose it as I noticed you pointing to "gnome-tweak-tool", and it looks similar. > is it possible it also tries to > switch the icon theme and it fails due to adwaita icon theme not being > installed on your machine? I'm just wild guessing. I don't know, I don't think so. How can I test this? > Does it also happen when eclipse is started with adwaita theme and not > dynamically switching? Yes, steps to reproduce: - close Eclipse - switch to Adwaita, - start Eclipse, - switch to Dark theme, press Ok. - switch back to Classic theme, press Ok. -> you will see the same result as in the video. *** Bug 495885 has been marked as a duplicate of this bug. *** *** Bug 465912 has been marked as a duplicate of this bug. *** If I use the Gtk inspector and add the following CSS, the bug goes away.
GtkButton {
background:transparent;
}
@Leo, would it be OK to add this property to the button under GTK?
(In reply to Lars Vogel from comment #42) > If I use the Gtk inspector and add the following CSS, the bug goes away. > > GtkButton { > background:transparent; > } This CSS is just making the button inherit its parent's colour since the button in now transparent. I'm not sure that this is the right approach. It actually just occurred to me that GTK supports "pseudo-classes" for certain states which don't fit into normal widget behaviour. One of those states is "backdrop". This selector is for when the widget doesn't have focus. On GTK3.20, I tried button:backdrop {background: red;} as an experiment using GtkInspector -- this works. On GTK3.18 and below it's : GtkButton:backdrop {background: red;}. I'll submit a patch soon -- Lars let me know if the patch fixes the issue for you. New Gerrit change created: https://git.eclipse.org/r/87592 (In reply to Eric Williams from comment #43) > (In reply to Lars Vogel from comment #42) > > If I use the Gtk inspector and add the following CSS, the bug goes away. > > > > GtkButton { > > background:transparent; > > } > > This CSS is just making the button inherit its parent's colour since the > button in now transparent. I'm not sure that this is the right approach. > > It actually just occurred to me that GTK supports "pseudo-classes" for > certain states which don't fit into normal widget behaviour. One of those > states is "backdrop". This selector is for when the widget doesn't have > focus. > > On GTK3.20, I tried button:backdrop {background: red;} as an experiment > using GtkInspector -- this works. On GTK3.18 and below it's : > GtkButton:backdrop {background: red;}. > > I'll submit a patch soon -- Lars let me know if the patch fixes the issue > for you. +1 Eric is finishing university right now. He might not be able to finish this in M5. Moving to M6. (@Eric, feel free to change if you are going to work on this). (In reply to Leo Ufimtsev from comment #46) > Eric is finishing university right now. He might not be able to finish this > in M5. Moving to M6. (@Eric, feel free to change if you are going to work on > this). That's fine, I won't have time to look at this again until M6. In GTK inspector the following seem to work:
GtkToolbar GtkButton {background-color: red;}
GtkToolbar GtkButton:backdrop {background-color: red};
(In reply to Eric Williams from comment #47) > (In reply to Leo Ufimtsev from comment #46) > > Eric is finishing university right now. He might not be able to finish this > > in M5. Moving to M6. (@Eric, feel free to change if you are going to work on > > this). > > That's fine, I won't have time to look at this again until M6. Eric, are you still planning to work on this bug? It seems late for M6 in any case and I've moved it out to 4.7 for now.. (In reply to Arun Thondapu from comment #49) > Eric, are you still planning to work on this bug? It seems late for M6 in > any case and I've moved it out to 4.7 for now.. I am not planning on working on this right now, *maybe* later in the month or in April, if time permits. (In reply to Eric Williams from comment #50) > (In reply to Arun Thondapu from comment #49) > > Eric, are you still planning to work on this bug? > I am not planning on working on this right now I try to have a look. I think I know how to fix that, based on the table header patch. (In reply to Lars Vogel from comment #51) > (In reply to Eric Williams from comment #50) > > (In reply to Arun Thondapu from comment #49) > > > Eric, are you still planning to work on this bug? > > I am not planning on working on this right now > > I try to have a look. I think I know how to fix that, based on the table > header patch. Lars, do you still plan to submit a patch for this for M7 or, should we move it out of 4.7? (In reply to Arun Thondapu from comment #52) > Lars, do you still plan to submit a patch for this for M7 or, should we move > it out of 4.7? Still planning this for 4.7. Not sure if I manage M7 but bug fixes are also possible in our polish milestone RC1. Moving to 4.8 as we don't have any potential patch yet. Lars, do you still see this one? Lars, do you plan to fix this (In reply to Gallyam Biktashev from comment #56) > Lars, do you plan to fix this I hope the SWT will look at this but if you have a patch please post it (In reply to Alexander Kurtakov from comment #55) > Lars, do you still see this one? Yes Created attachment 273468 [details]
Eclipse Oxigen.3 desktop capture
I can confirm that it still happens with Oxygen.3 Release 4.7.3 build id:20180308-1800 (Eclipse Java EE IDE for Web Developers)
When I open any dialog many button's background turn to white.
Eclipse theme: dark.
Ubuntu 17.10 with Default Desktop (based on Gnome Shell). Desktop theme: Ambiance. Icons: Ubuntu-mono-dark.
(And it happens too with Ubuntu 16.04 on Unity Desktop)
Finally works fine for me in Ubuntu 18.04 with Eclipse SDK Version: Photon (4.8) Build id: I20180509-2000 OS: Linux, v.4.15.0-20-generic, x86_64 / gtk 3.22.30 (In reply to Lars Vogel from comment #60) > Finally works fine for me in Ubuntu 18.04 with Eclipse SDK > Version: Photon (4.8) > Build id: I20180509-2000 > OS: Linux, v.4.15.0-20-generic, x86_64 / gtk 3.22.30 Can you attach new screenshot so I can see how it looks on ubuntu? Created attachment 274040 [details]
Screenshoton Ubuntu 18.04 - No more while buttons if dialog opens
(In reply to Alexander Kurtakov from comment #61) > Can you attach new screenshot so I can see how it looks on ubuntu? Sure, see new screenshot. |
Created attachment 253200 [details] Button in a shell without focus See screenshot for an example. To test this, open the preference dialog, or something similar Tested on Ubuntu 15.04