store color in linear

This commit is contained in:
2025-09-20 13:34:04 -04:00
parent e35e72402f
commit 3653f24e06
3 changed files with 25 additions and 22 deletions

View File

@@ -157,10 +157,10 @@ impl Client {
let rect = rect(color)
.id_on(Sense::click(), move |id, ctx: &mut Client, _| {
ctx.ui[main].inner.set_static(to);
ctx.ui[id].color = color.add_rgb(-0.2);
ctx.ui[id].color = color.mul_rgb(0.7);
})
.edit_on(Sense::HoverStart | Sense::unclick(), move |r, _| {
r.color = color.add_rgb(0.4);
r.color = color.add_rgb(0.2);
})
.edit_on(Sense::HoverEnd, move |r, _| {
r.color = color;