Closed vooze closed 8 years ago
I'm not sure if this is a theme related issue.
This issue does not exist in Gnome 3.
However, on Ubuntu, I have seen this problem, so I will assume you are running Ubuntu...
To resolve, pass the current XDG_CURRENT_DESKTOP
environment variable to sudo
. For example,
sudo XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP gedit
To make this permanent, you can add XDG_CURRENT_DESKTOP
as an env_keep
parameter in /etc/sudoers
.
WARNING: To prevent inadvertent mistakes, do not edit the /etc/sudoers
file directly. Only use the sudo visudo
command.
Add the XDG_CURRENT_DESKTOP
line just below the env_reset
line, as shown below. You might also want to add the DBUS_SESSION_BUS_ADDRESS
line, shown below; this show a locally integrated menu in the application window, since globally integrated menus don't work for applications run with sudo
.
sudo visudo
...
Defaults env_reset
Defaults env_keep += "XDG_CURRENT_DESKTOP"
Defaults env_keep += "DBUS_SESSION_BUS_ADDRESS"
Defaults mail_badpass
...
Note that the spaces after Defaults
above is actually a single
Use <CTRL-X>
to exit and <Y>
to save the file. Be sure to remove the ".tmp
" extension from the file name when saving.
Hi, thank you for responding.
While this fixes things for applications like gedit, others that only use CSD still have problems in ubuntu 16.04: calendar, gcolor3 and many others. It works in numix and ambiance, so it should be fixable.
Ah, yes... I see what you mean.
I have now looked though the code again, unable to figure out where it goes "wrong" Anyone have some idea? I would not mind just fixing it in my own gtk.css if someone could help me :)
To help with testing, I checked the pop-up dialogs in gedit. This is what I found.
OK; rounded corners present [all are non-CSD dialogs]...
Not OK; rounded corners missing...
@vooze,
This doesn't solve the problem, but may help you to look in the right place...
In gtk.css
, search for ".csd .titlebar {
"
On the next line, add "border-radius: 10;
"
Open a window with CSD. I used a larger radius to make the issue obvious-- both the top and bottom portions of the CSD become rounded. The transparency in the back also needs to be accounted for.
I think I found the issue: the sharp corners on the CSD windows seem the be caused by the shadow effect which does not have an "alpha" channel.
In gtk.css, search for...
box-shadow: 0 0 0 1px #20232b
(This is just below the ".window-frame {
" section).
Replace with..
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1)
This bug affects both "Arc-Dark" and "Arc-Darker" themes.
After applying this fix, I still think that the radii on the CSD window headers should be increased a little more, to match the non-CSD windows, but this seems to take care of the main problem.
Awesome! Looking into it tomorrow. Thank you.
Just tested it and yes, it works.. But the corners look slightly different on non-CSD windows yes, I'll try to mess around with it and see if I can fix it.
This is clearly a Unity bug, it works everywhere else. You should report that upstream.
**Details:
See screenshot 1 and 2.
Rounded corners gedit (opened without root)
No rounded corners with gedit (when opened with sudo)
I looked at the gtk.css but could not figure out where I should change it. Ambiance works, so it should be possible.
Thank you :)