From 332c47fc9d72136ff62e065cc480c2769798de03 Mon Sep 17 00:00:00 2001 From: Dynamitos Date: Thu, 15 Oct 2026 21:14:07 +0200 Subject: [PATCH] Make style initially dirty so the styles get applied on first frame --- src/Engine/UI/Style/Fonts.h | 2 +- src/Engine/UI/Style/Style.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Engine/UI/Style/Fonts.h b/src/Engine/UI/Style/Fonts.h index cf700e0..7f7a131 100644 --- a/src/Engine/UI/Style/Fonts.h +++ b/src/Engine/UI/Style/Fonts.h @@ -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 diff --git a/src/Engine/UI/Style/Style.h b/src/Engine/UI/Style/Style.h index a356fa3..ecf762d 100644 --- a/src/Engine/UI/Style/Style.h +++ b/src/Engine/UI/Style/Style.h @@ -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 \ No newline at end of file