hardpixel / unite-shell

Unite is an extension that makes GNOME Shell look like Ubuntu Unity Shell.
GNU General Public License v3.0
930 stars 62 forks source link

Window buttons appearance on light/dark themes | New Feature + Workaround #253

Closed mBilG closed 3 years ago

mBilG commented 3 years ago

Hi, great extension. Enjoy it.

One minor issue with the color of the icons when automatically switching between light and dark themes: on light themes they are hard to see especially if shell is white color. The button style i use is Yaru.

I think there must be a way to capture if the shell is dark or light and invert the blacks and whites. or maybe set 2 different svg sets for automatic detection.

One workaround that I use is to change the svg color from white to a shade of "grey" so that they appear correctly on both light/dark themes.

jonian commented 3 years ago

Hi @mBilG, unfortunately I haven't found a way to get the shell panel color to automatically switch the theme, but I'm working on a solution where the button themes will have a list of matching GTK and Shell themes.

As for Yaru, we need to have a Yaru Light theme variant, would you like to make a PR for that?

Creating a new theme is very easy, copy the yaru folder into yaru-light, modify the svg files and you're done.

If you use the master branch, you can add user themes in ~/.local/share/unite-shell/themes as you can see (here). Also you can override the themes bundled with the extension if you use the same theme folder name.

mBilG commented 3 years ago

Hi @mBilG, unfortunately I haven't found a way to get the shell panel color to automatically switch the theme, but I'm working on a solution where the button themes will have a list of matching GTK and Shell themes.

I think one workaround could be to detect if there is the string "dark" in the theme and invert the svg color. I think this is usually possible in the theme css. I will try to see if it can be done for the extension. Maybe refer to this extension that achieves the same for the logos: https://extensions.gnome.org/extension/4451/logo-menu/

As for Yaru, we need to have a Yaru Light theme variant, would you like to make a PR for that?

I can do that.. Will submit asap..

jonian commented 3 years ago

I have added the light variant for Yaru and now the extension picks the dark/light variant based on the panel background.

I think one workaround could be to detect if there is the string "dark" in the theme and invert the svg color.

That is not possible, the themes are static and the images (svgs) are used as backgrounds. Also not all themes are simple like Yaru and converting them to light variant is not feasible.

Maybe refer to this extension that achieves the same for the logos: https://extensions.gnome.org/extension/4451/logo-menu/

That extension does not detect the panel background, it uses symbolic (monochrome) logos and their color changes automatically by gnome-shell.