+3
-1
data/core/rootview.lua
+3
-1
data/core/rootview.lua
···
349
349
color = style.text
350
350
end
351
351
core.push_clip_rect(x, y, w, h)
352
-
common.draw_text(style.font, color, text, "center", x, y, w, h)
352
+
x, w = x + style.padding.x, w - style.padding.x * 2
353
+
local align = style.font:get_width(text) > w and "left" or "center"
354
+
common.draw_text(style.font, color, text, align, x, y, w, h)
353
355
core.pop_clip_rect()
354
356
end
355
357