From 11c5bf2bcbaec97b70a5f74d7364885ab4ae231e Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Sat, 31 Jan 2026 13:41:35 +1000 Subject: [PATCH] Set theme from appstate on startup --- src/SharpIDE.Godot/IdeWindow.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SharpIDE.Godot/IdeWindow.cs b/src/SharpIDE.Godot/IdeWindow.cs index 6d0bf9f..21d714c 100644 --- a/src/SharpIDE.Godot/IdeWindow.cs +++ b/src/SharpIDE.Godot/IdeWindow.cs @@ -2,6 +2,7 @@ using Godot; using Microsoft.Extensions.Hosting; using SharpIDE.Application.Features.Build; using SharpIDE.Godot.Features.IdeSettings; +using SharpIDE.Godot.Features.Settings; using SharpIDE.Godot.Features.SlnPicker; using Environment = System.Environment; @@ -32,6 +33,7 @@ public partial class IdeWindow : Control GodotOtelExtensions.AddServiceDefaults(); Singletons.AppState = AppStateLoader.LoadAppStateFromConfigFile(); GetTree().GetRoot().ContentScaleFactor = Singletons.AppState.IdeSettings.UiScale; + SetIdeThemeFromAppState(); //GetWindow().SetMinSize(new Vector2I(1152, 648)); Callable.From(() => PickSolution(true)).CallDeferred(); } @@ -56,6 +58,12 @@ public partial class IdeWindow : Control GD.Print($"Detected display refresh rate: {refreshRate} Hz, setting max FPS to {refreshRateBelowCapRoundedDownToInt} Hz"); Engine.MaxFps = refreshRateBelowCapRoundedDownToInt; } + + private void SetIdeThemeFromAppState() + { + var theme = Singletons.AppState.IdeSettings.Theme; + this.SetIdeTheme(theme); + } public void PickSolution(bool fullscreen = false) {