Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.78k stars 712 forks source link

font color problem #1741

Closed TAforever closed 2 years ago

TAforever commented 2 years ago

Today I compiled waybar-git and on most modules the color began to match the color of the background. Version 0.9.13 does not have this problem. waybar-git

TAforever commented 2 years ago

Here is version 0.9.13 waybar

danielrparks commented 2 years ago

This happens with the default style as well: image

frkli1965 commented 2 years ago

Related to issue #1726?

danielrparks commented 2 years ago

Looks like it's related. I bisected it to b8322c4b4b023d8e6fbe8b6bf4100d6c60a06e42 which is from the same PR referenced in that issue (#1120 ). Note that for me, this is affecting even non-custom modules.

tpeacock19 commented 2 years ago
label:disabled,
button:disabled {
  color: inherit;
  background-image: none;
}

It seems like any module that does not have an "on-click" value in the config shows up as a disabled button. The above fixed this issue for me. Alternatively, you can add "on-click": "true", and it should pick up existing button styles.

frkli1965 commented 2 years ago

Thanks tpeacock19 ...

Appending "on-click"; "true" to the config file helped to resolve the 'memory' module's font color for me whereas altering the 'style.css' with the provided suggestions didn't.

Decided to drop the "custom-menu" module as it's no longer supported it seems.

Kind regards,

LudovicoPiero commented 2 years ago
label:disabled,
button:disabled {
  color: inherit;
  background-image: none;
}

It seems like any module that does not have an "on-click" value in the config shows up as a disabled button. The above fixed this issue for me. Alternatively, you can add "on-click": "true", and it should pick up existing button styles.

This fixed my issue :+1:

Alexays commented 2 years ago

@pinselimo Can we add something like in #1738 to handle this issue?

bklaase commented 2 years ago
label:disabled,
button:disabled {
  color: inherit;
  background-image: none;
}

It seems like any module that does not have an "on-click" value in the config shows up as a disabled button. The above fixed this issue for me. Alternatively, you can add "on-click": "true", and it should pick up existing button styles.

that improves it, but the colors are still muted. As if maybe opacity is lowered as well

tpeacock19 commented 2 years ago

I've found a more robust solution that may work for you. You'll have to add all: unset as the first declaration in these two rules:

button {
  all: unset;
  ...[other css declarations]...
}
label {
  all: unset;
  ...[other css declarations]...
}

The all: unset rules seems to put everything back to default. It should cover all variations between themes.

Alexays commented 2 years ago

3cf027fc567c343f5523b7b08476a467d5248b37 Should fix the pb Can someone try?

TAforever commented 2 years ago

3cf027f Should fix the pb Can someone try?

The change happened, but still there is an error. waybar_grim

hajosattila commented 2 years ago

Same problem here. Waybar 0.9.13 vs 0.9.15

scrn-2022-11-03-14-52-19

scrn-2022-11-03-14-52-09

danielrparks commented 2 years ago

I'm still having the same problem with the default style as well. image

Alexays commented 2 years ago

And with 92cc01f?

ChrisLane commented 2 years ago

And with 92cc01f?

Just installed git package at that point in history. Seems to be fixed.

danielrparks commented 2 years ago

I still have the same problem with 92cc01f .

TAforever commented 2 years ago

And with 92cc01f?

Returned to the previous state. new_waybar_grim

Alexays commented 2 years ago

And with latest one 3030850? Sorry for the mess..

roland-5 commented 2 years ago

And with latest one 3030850? Sorry for the mess..

Still grey. ps_20221104085308

roland-5 commented 2 years ago

So with last commit, battery icon changed and with it, it's color to white. :P

ps_20221104220740

danielrparks commented 2 years ago

The latest commit didn't work for me either.

TAforever commented 2 years ago

For the sake of interest, I decided to launch river with waybar in BSPWM and there is no such problem there. Maybe this information will be useful to you. river_X

TAforever commented 2 years ago

And so: by experience, I realized that the problem lies in the GTK theme. For some reason, the font color started to depend on the theme. I installed the Gruvbox-Material-Dark theme instead of Qogir-dark as I have in BSPWM and there is no problem with the font. 20221106_17h40m58s_grim

tpeacock19 commented 2 years ago

And so: by experience, I realized that the problem lies in the GTK theme.

Yes, I'm not sure there can be a solution implemented by Waybar since I imagine the theme will be applied after its loaded. The all: unset should be in the default configuration and perhaps highlighted in the wiki as a fix for this issue.

TAforever commented 2 years ago

And so: by experience, I realized that the problem lies in the GTK theme.

Yes, I'm not sure there can be a solution implemented by Waybar since I imagine the theme will be applied after its loaded. The all: unset should be in the default configuration and perhaps highlighted in the wiki as a fix for this issue.

@Alexays this seems to be the solution to the problem.

danielrparks commented 2 years ago

Indeed, adding

* {
    all: unset;
}

to my configuration causes it to start working at 92cc01f40149292d315456f7e5bbdad6dc099caf.

Sorry about that! It didn't occur to me that my gtk theme would be applied after waybar's style changes.

Alexays commented 2 years ago

Closed as reverted