forked from Dynamitos/Seele
Make style initially dirty so the styles get applied on first frame
This commit is contained in:
1 parent
ca69fc7dbc
commit
332c47fc9d
2 files changed
+3
-2
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user