fix(ui): drop the border from the screen root
The root fills the whole panel, so a border sent it through the per-pixel roundRect path on every draw. The panel background is not a card; cards that want a border set one explicitly.
This commit is contained in:
+3
-4
@@ -79,7 +79,6 @@ local function palette(seed)
|
||||
pressedFace = color(accent),
|
||||
pressedColor = color(background),
|
||||
focusColor = color(accent),
|
||||
focusWidth = 2,
|
||||
radius = seed.radius,
|
||||
}
|
||||
end
|
||||
@@ -133,7 +132,7 @@ end)
|
||||
|
||||
local STYLE_KEYS = {
|
||||
"color", "fill", "border", "face", "pressedFace", "pressedColor",
|
||||
"focusColor", "focusWidth", "radius", "font", "textStyle",
|
||||
"focusColor", "radius", "font", "textStyle",
|
||||
}
|
||||
|
||||
local function applyStyle(id, spec)
|
||||
@@ -301,15 +300,15 @@ local Screen = {}
|
||||
Screen.__index = Screen
|
||||
|
||||
applyPalette = function(root)
|
||||
-- The root is the panel background, not a card: no border, so it takes the fast fillRect
|
||||
-- path rather than the per-pixel roundRect one. Radius stays so cards inherit it.
|
||||
node.setStyle(root, {
|
||||
color = ui.theme.color,
|
||||
background = ui.theme.background,
|
||||
border = ui.theme.muted,
|
||||
face = ui.theme.face,
|
||||
pressedFace = ui.theme.pressedFace,
|
||||
pressedColor = ui.theme.pressedColor,
|
||||
focusColor = ui.theme.focusColor,
|
||||
focusWidth = ui.theme.focusWidth,
|
||||
radius = ui.theme.radius,
|
||||
font = gui.FONT_UI,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user