1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-20 08:58:00 +02:00

Initial theme support

This commit is contained in:
Brian Fiete 2020-08-05 05:37:05 -07:00
parent b50fbdb51d
commit 657866c3bc
18 changed files with 573 additions and 197 deletions

View file

@ -6997,7 +6997,7 @@ namespace IDE
public void SetScale(float scale, bool force = false)
{
PhysSetScale(scale, force);
gApp.mSettings.mEditorSettings.mUIScale = DarkTheme.sScale * 100.0f;
gApp.mSettings.mUISettings.mScale = DarkTheme.sScale * 100.0f;
}
void SysKeyDown(KeyDownEvent evt)
@ -10736,6 +10736,7 @@ namespace IDE
Font.AddFontFailEntry("Segoe UI", scope String()..AppendF("{}fonts/NotoSans-Regular.ttf", mInstallDir));
DarkTheme aTheme = new DarkTheme();
mSettings.mUISettings.Apply(); // Apply again to set actual theme
aTheme.Init();
ThemeFactory.mDefault = aTheme;
@ -10879,7 +10880,7 @@ namespace IDE
int dpi = mMainWindow.GetDPI();
if (dpi >= 120)
{
mSettings.mEditorSettings.mUIScale = 100 * Math.Min(dpi / 96.0f, 4.0f);
mSettings.mUISettings.mScale = 100 * Math.Min(dpi / 96.0f, 4.0f);
mSettings.Apply();
}
}