Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-09-08 15:02:03

-iak-
Member
Registered: 2017-10-30
Posts: 98

[Solved] Panel icons autom.lly change color according to window theme

Hi everybody,
as the title says, some panel icons  (battery and audio) automatically change color according to the window theme.

They become white if I use a dark theme and black if I use a clear one, even if I don't change the icon theme.

The problem is, I think, that the theme I'm using right now is almost dark, even if it is classified as clear.

Is there a way to avoid this? Thanks a lot in advance.

P.S. I'm on Debian Testing

-Andrea-

Last edited by -iak- (2018-09-08 19:26:13)

Offline

#2 2018-09-08 15:13:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

Which version of Xfce and which versions of the panel plugins are you using (there are 2 battery and 2 audio plugins in Xfce alone)?

Can you post a screenshot of the issue?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2018-09-08 15:22:13

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

Hi ToZ, I'm using Xfce 4.12, the external Pulseaudio icon and the notification area's battery icon (not the one form the energy manager)

14o61vo.png

Offline

#4 2018-09-08 15:53:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

Which appearance theme are you using? Try the latest version of the greybird theme to see if it helps.

Looks like these are the gtk3 versions of the plugins. You can also add something like the following to ~/.config/gtk-3.0/gtk.css:

.panel {
   background-color: rgba(80,80,71,1.0);
}

This will only work for the non-hover/active states. You may need to expand it to cover all options.

Exactly which plugin is the battery? Is it the xfce4-battery-plugin?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2018-09-08 16:00:39

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

It's "oomox-atelier-extuary", made with oomox. If I switch to dark themes or to Greybird the icon gets white.

The battery plugin is the one you said.

EDIT:

This will only work for the non-hover/active states. You may need to expand it to cover all options.

How do I do this? I created the ~/.config/gtk-3.0/gtk.css file and added what you said (restarting the panel of course) and it just darkened some buttons without affecting the icons. I would like to keep the original theme colors, do you think it could be possible?

Last edited by -iak- (2018-09-08 16:04:57)

Offline

#6 2018-09-08 16:06:29

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

P.S.
With any other clear theme it happens the same

Offline

#7 2018-09-08 16:32:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

Greybird should work better than that. Make sure you restart the panel and you might want to download the latest version from https://github.com/shimmerproject/Greybird.

As for your theme, sorry it took me some time to find it and compile it. Try this in ~/.config/gtk-3.0/gtk.css:

.xfce4-panel {
   background-color: rgba (146, 145, 129, 1.0);
}

#pulseaudio-button {
   border-width: 0;
}

The only thing that doesn't work is the battery hover effect. I'm looking into it now.

Edit: changed something in the gtk.css file

Last edited by ToZ (2018-09-08 16:33:36)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2018-09-08 16:42:28

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

No worries, thanks to you for your time!

I'm sorry but it doesn't work

Offline

#9 2018-09-08 16:43:43

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

Odd. It works on my system.

Do you have any other content in ~/.config/gtk-3.0/gtk.css or /etc/gtk-3.0/gtk.css?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2018-09-08 16:48:05

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

Nope, there were no such file anywhere, I just created the ~/.config/gtk-3.0/gtk.css one. It homogenizes the buttons' color with the panel's one, so it's read but te icons' color remains the same

Offline

#11 2018-09-08 16:54:57

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

Can you post back the contents? I edited my post a few times because of typos.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#12 2018-09-08 17:02:06

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

Sure

~/.config/gtk-3.0/gtk.css↓

.panel {
   background-color: rgba(80,80,71,1.0);
}

.xfce4-panel {
   background-color: rgba (146, 145, 129, 1.0);
}

#pulseaudio-button {
   border-width: 0;
}

Offline

#13 2018-09-08 17:02:59

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

Try this instead:

.xfce4-panel {
   background-color: rgba (146, 145, 129, 1.0);
   color: grey;
}

#pulseaudio-button {
   border-width: 0;
   color: grey;
}

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#14 2018-09-08 17:06:35

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

Now only the audio icon turned gray. So there's no way to make the panel use the "heritage" white theme icons?

Offline

#15 2018-09-08 17:09:52

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

Which icon theme are you using? Maybe it doesn't have the correct icons?

Try changing:

color: grey;

...to:

color: rgb (xx, yy, zz);

...where xx, yy, zz are the correct RGB color codes that you need.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#16 2018-09-08 17:14:20

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

I'm using the oomox-atelier-extuary icon theme too, which I sat to inherit from elementary-xfce-darker. I checked and it has all the white icons. This problem occours with any other icon theme, anyway.

Offline

#17 2018-09-08 17:17:24

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

Try changing:

color: grey;

...to:

color: rgb (xx, yy, zz);

...where xx, yy, zz are the correct RGB color codes that you need.

I just changed "gray" to "white" and it worked for the audio icon

Offline

#18 2018-09-08 18:22:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

It doesn't seem to work for the battery icon though - it doesn't look like its programmed to allow this kind of control.

Are your icons all colored white? When i compile the icon theme white, it looks better.

Why don't you use the xfce4-power-manager-plugin?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#19 2018-09-08 18:34:36

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

If it can help, the battery icon appears to be white in the panel settings! xnxh76.png

Are your icons all colored white?

other icons (like the network manager) are white as they're supposed to be.

Why don't you use the xfce4-power-manager-plugin?

Essentially for this reason rw1jrt.png

Offline

#20 2018-09-08 19:13:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

Does adding the following snippet make any difference with the power-manager plugin?

#xfce4-power-manager-plugin {
   -gtk-icon-style: symbolic;
   color: white;
}

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#21 2018-09-08 19:24:42

-iak-
Member
Registered: 2017-10-30
Posts: 98

Re: [Solved] Panel icons autom.lly change color according to window theme

It worked, the black one is now white! I just have to remember of this file when I'll change theme again.

Thanks a lot ToZ.

Just in order to understand, wasn't it possible to disable the feature that detects the windows' theme color and chooses the icons color at my place?

Last edited by -iak- (2018-09-08 19:28:38)

Offline

#22 2018-09-08 21:31:31

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] Panel icons autom.lly change color according to window theme

-iak- wrote:

Just in order to understand, wasn't it possible to disable the feature that detects the windows' theme color and chooses the icons color at my place?

These tweaks should be part of the theme - so the oomox* themes will need to be updated to properly account for the new GTK3 versions of Xfce and Xfce components. The icon theme as well.

That being said, using the default built-in adwaita theme (or the latest Greybird since it's being updated along with Xfce's migration to GTK3) and the default Tango (or the latest elementary-xfce) icon themes should have everything correctly. If it doesn't work with these, then file a bug report. If it doesn't work with another appearance or icon theme, then you'll need to file the bug report over there.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB