ArcaEge / day-progress

A GNOME shell extension that shows a progress bar of your day
https://extensions.gnome.org/extension/7042/day-progress/
GNU General Public License v3.0
38 stars 1 forks source link

Almost invisible with Adwaita light theme #10

Closed mapuo closed 3 months ago

mapuo commented 3 months ago

Hi,

I'm using Night Theme Switcher to change between Adwaita dark and light themes, but you can do that with a command as well (ex.: gsettings set org.gnome.desktop.interface color-scheme prefer-light).

My issue is when the light theme is selected the day-progress is not visible, like in this screenshot:

image

ArcaEge commented 3 months ago

OK, I'll be having a look at this soon. Do other extensions have this issue? ~Also, are you using a custom shell theme? The top panel is dark with the default theme even when light mode is enabled.~ Edit: I'm guessing you're using GNOME classic. I can replicate this and most other extensions do not have this issue. I'll be having a look at it now.

ArcaEge commented 3 months ago

There's no way to make this work with CSS only to my knowledge, therefore if what you are using is a theme, it won't work. However, if it is GNOME classic, I can add a check to use a second CSS file if GNOME classic is being used

ArcaEge commented 3 months ago

I've added GNOME classic support in commit d398a9d, publishing to Extensions now. It may take a day or so to get the update published though.

mapuo commented 3 months ago

Well, that was fast. :) I'm using Arch with Gnome, I guess it is 'classic' - I don't have additional themes installed, but I'm not sure. If there is a way to check, please, tell me and I'll check it. Extension Manager shows the Day Progress at version 11: image Is this the version with these changes or should I wait for the next version?

ArcaEge commented 3 months ago

Yes, v11 should be the one with the changes, although if you are using Wayland (echo $XDG_SESSION_TYPE) you need to log out for the update to apply. If you are on X11, you can press Alt+F2 and type in 'r' instead of logging out. You should be able to check if you're using classic checking the value of GNOME_SHELL_SESSION_MODE by:

echo $GNOME_SHELL_SESSION_MODE

If you're using classic, it should print 'classic', although if you're on plain GNOME it won't print anything. If you want to switch between the two, (I'm guessing you have GDM installed since you're using GNOME) you can log out and click on the cog in the bottom right when logging in.

If I sound verbose (I realise you're using arch) it's so that ubuntu users can understand :)

mapuo commented 3 months ago

Oh, OK. So it seems that I'm on just GNOME, without the 'classic' - when I go the the login screen cogwheel it says so. According to Arch Wiki it is the default Gnome running on Wayland. When I run the echo $GNOME_SHELL_SESSION_MODE it prints empty line. But the change does not work in that mode - it is still light on the light theme. Is this something related with Wayland or is it something else?

ArcaEge commented 3 months ago

That's strange... do you have the 'user themes' extension installed? Also, are there any panel-related extensions installed? I should probably re-open the issue in that case.

Edit: Does the panel colour change if you enable dark theme?

mapuo commented 3 months ago

User Themes is installed and enabled. I see also Light Style is installed and enabled. I may have some extension that does something to the Panel, but I'm not sure - I'll test. And yes, the Panel colour changes from light to dark and back again when I enable/disable Dark mode.

Edit: I've disabled all extensions, but Light Style and Day Progress and it still shows light on light.

ArcaEge commented 3 months ago

I may have some extension that does something to the Panel, but I'm not sure - I'll test.

Yes, the Light Style extension seems to do just that. Thankfully, it's a mostly simple fix - it just seems to update sessionMode.colorScheme from resource:///org/gnome/shell/ui/main.js. I'll be working on it now.

ArcaEge commented 3 months ago

OK, so I've done it :tada: image

However, it only works when Light Style and light mode are used together. When you enable dark mode with Light Style (the extension) enabled, the panel will be dark but so will the extension. I'm working on a fix for that now.

ArcaEge commented 3 months ago

It's done, uploading to Extensions.

ArcaEge commented 3 months ago

I'm closing the issue now.

ArcaEge commented 2 weeks ago

@mapuo Hello, I wanted to tell you that I'm dropping support for the 'Light Style' extension to fix #13 as it uses a non-standard way of making the bar white - it's not the same as setting org.gnome.desktop.interface.color-scheme to prefer-light, it changes Main.sessionMode.colorScheme. However, in Ubuntu Main.sessionMode.colorScheme is always set to prefer-light (or at least with the default theme), therefore having support for this extension would mean that the colours would be broken in Ubuntu. There is no clean and practical way I could find to get both of them to work, therefore I'm dropping support for it.

If you still want a light bar, you can add gsettings set org.gnome.desktop.interface color-scheme prefer-light and gsettings set org.gnome.desktop.interface color-scheme prefer-dark to the commands section of Night Theme Switcher.