Make style initially dirty so the styles get applied on first frame

This commit is contained in:
Dynamitos committed 2026-10-15 21:14:07 +02:00
1 parent ca69fc7dbc
commit 332c47fc9d
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ namespace UI {
// the name is runtime data (a string literal can't be a C++ template arg), and
// Text::applyStyle resolves it to a PFontAsset (falling back to Theme::defaultFont).
struct Font_Arial {
static void apply(Style& s, const Theme&) { s.fontName = "arial.ttf"; }
static void apply(Style& s, const Theme&) { s.fontName = "arial"; }
};
} // namespace UI
} // namespace Seele
+2 -1
View File
@@ -66,7 +66,8 @@ struct Style {
uint32 right = 0;
// set by the element when a runtime mutation needs a re-style of this subtree
bool dirty = false;
// default true so we do initial style calculations
bool dirty = true;
};
} // namespace UI
} // namespace Seele