Choices: review r1 fixes
This commit is contained in:
40 files changed
+774
-209
No files matched your search
+4
-5
@@ -36,12 +36,11 @@ func CheckBox(p *ui.Painter, r ui.Rect, s CheckState, k theme.Tokens, hover bool
|
||||
if s == Mixed {
|
||||
mark = "minus"
|
||||
}
|
||||
Mark(p, r, mark, k.OnAccent)
|
||||
in := r.W * 0.12
|
||||
Mark(p, ui.Rect{X: r.X + in, Y: r.Y + in, W: r.W - 2*in, H: r.H - 2*in}, mark, k.OnAccent)
|
||||
}
|
||||
|
||||
// Mark paints the Lucide icon name inset in r. Icons sit on the pixel grid,
|
||||
// so their cached masks never differ between frames or tests.
|
||||
// Mark paints the Lucide icon name in r, on the pixel grid so masks never vary.
|
||||
func Mark(p *ui.Painter, r ui.Rect, name string, c ui.Color) {
|
||||
in := r.W * 0.12
|
||||
p.Icon(icons.Must(name), ui.Rect{X: r.X + in, Y: r.Y + in, W: r.W - 2*in, H: r.H - 2*in}, c)
|
||||
p.Icon(icons.Must(name), r, c)
|
||||
}
|
||||
Reference in new issue
Block a user