Zren / breeze-alphablack

Breeze Light theme with minor improvements and a black panel/titlebar.
https://store.kde.org/p/1084931/
35 stars 7 forks source link

Alpha Black widget appears on other themes and controls their color #8

Closed michaldybczak closed 5 years ago

michaldybczak commented 5 years ago

I updated themes yesterday via Discover and today I noticed this Breeze Alpha Black widget on systray.

The weird thing is: I don't have Alpha Black activated, I use my own theme. I checked on various themes and the widget shows on all of them. So I did some experiments and here are my conclusions:

It works regardless of the theme but in other themes it’s functionality is somewhat bugged. The thing is, option “reset colors” don’t work at all, on any theme. So if you use another theme then Alpha Black, it always shows that the current color is black, but it isn’t for other themes (so I can't copy the color because it's always shows black for other themes). So when you want to reverse changes, you have to choose black and it overwrite current theme with that color. So the only way to get back to original color is to switch to another theme and switch back to the one you want.

So there are 2 issues:

  1. The widget appears on other themes (it shouldn't)
  2. "Reset colors" button doesn't work.
Zren commented 5 years ago

The widget is automatically installed when you download the theme. Unfortunately it doesn't appear in the system tray plasma restarts (relog).

You can uninstall the widget via "Add Widgets" and click the "uninstall widget" button.

The widget appears on other themes (it shouldn't)

The only way to reload the Desktop Theme is to switch to another theme (I use "Breeze Dark"). So I guess I could hide it when it's not one of the two themes.

The thing is, option “reset colors” don’t work at all, on any theme.

Resets Colors will undo the Titlebar Colors by looking at the preinstalled color theme file in /usr/share/color-schemes/ and copying those colors to the kdeglobals file.

https://github.com/Zren/breeze-alphablack/blob/master/desktoptheme.py#L77

I haven't gotten around to having to copy the colors from a color theme defined in your home directory (like a downloaded color theme), nor a color theme included in a desktop theme. A surefire way to fix the titlebar color is by clicking reset, then changing the color theme to another theme, then back to the one you desire.

Zren commented 5 years ago

In v4 of the widget, it will hide when widgets are locked. It will also hide when not using "Breeze AlphaBlack" or "Breeze Dark". It also comes with a text blurb at the bottom to educate the user about how to uninstall the "automatically installed widget".

The "Reset Colors" button should now work properly. It will scan both the root dir and the home dir. It will also scan all color schemes if the filename is not Name.colors like "Breeze Solarized Light" does.

michaldybczak commented 5 years ago

Actually, if the widget was showing the actual color of used theme and was not named AlphaBlack Control, it could have been a general theme widget ;).

Anyway, thanks, those changes will make it less confusing. However, I'm not sure how to update it since it didn't come in a package but with a theme. Is it enough to update the theme (like via Discover) and the new options will be there? So far Discover is not seeing any new AlphaBlack update.

Zren commented 5 years ago

To update the widget, just go to "Add Widgets > Get New > Download > Installed" then click Update.

Then relog to reload the widget (or run killall plasmashell; kstart5 plasmashell).

not named AlphaBlack Control, it could have been a general theme widget

I started writing a general use widget 2-3 times, but usually dropped it since I wanted too many "alphablack" specific settings and ran out of steam when trying to also make it general purpose. It would be challenging to modify themes in the root directory. I'd need to copy them to the home directory, with a different name. The themes would then not get updated by the package manager.

Now that I think of it, users are probably wiping all their settings whenever they update my theme. My git repo is in ~/.local/share/plasma/desktoptheme/breeze-alphablack so I've avoid that... Hmmm, not much I could do there. I could move the config.ini to ~/.config to preserve the variables. You'd still need the user to run a python script to update the breeze-alphablack/colors file and modify all the svg files to set the opacity.