hyprwm / hyprlock

Hyprland's GPU-accelerated screen locking utility
BSD 3-Clause "New" or "Revised" License
822 stars 59 forks source link

`input_field` placeholder text color is inverted #299

Open Vosjedev opened 6 months ago

Vosjedev commented 6 months ago

The text color of the placeholder text in the input field is inverted. This works fine for getting light grey when the dots are dark grey, but for colors it's kinda not working.

My dots are orange rgb(255,129,0), so the placeholder text became blue (I guess rgb(0,126,255)). I would like to be able to either configure the placeholder's textcolor separately from the dots' color, or not have it be inverted.

Vosjedev commented 6 months ago

I just looked at the pr's (only looked at issues before posting), and it seems like #35 adds the solution. I guess I will close this as soon as that is merged then. Sorry for yet another useless issue...


addition, 6min later

Maybe it should be clear in the docs the placeholder text is inverted, and that the solution (for now?) is to use pango markup: <span foreground=##RRGGBB>text</span>. I guess it should also be clearer you need to escape the #.

rafaVls commented 2 months ago

Maybe it should be clear in the docs the placeholder text is inverted, and that the solution (for now?) is to use pango markup: <span foreground=##RRGGBB>text</span>. I guess it should also be clearer you need to escape the #.

How exactly are you writing this markup in your hyprlock.conf file? This is what I'm trying to do for my input_field:

input-field {
...
  placeholder_text = <i foreground=##3a3535>Input Password...</i>
...
}

The result is the input field placeholder text reads "\Input Password...\"

rafaVls commented 2 months ago

Figured it out, it's supposed to be:

input-field {
...
  placeholder_text = <span foreground="##3a3535"><i>Input Password...</i></span>
...
}