Skip to content

Commit

Permalink
Fix a bug that when loading new style, old one will have leftover
Browse files Browse the repository at this point in the history
  • Loading branch information
LEOYoon-Tsaw committed May 18, 2024
1 parent 7869556 commit e6cf350
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Squirrel.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.99.4;
CURRENT_PROJECT_VERSION = 0.99.5;
DEAD_CODE_STRIPPING = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -648,7 +648,7 @@
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 0.99.4;
CURRENT_PROJECT_VERSION = 0.99.5;
DEAD_CODE_STRIPPING = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down
9 changes: 7 additions & 2 deletions sources/SquirrelPanel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,13 @@ final class SquirrelPanel: NSPanel {
}

func load(config: SquirrelConfig, forDarkMode isDark: Bool) {
let theme = isDark ? view.darkTheme : view.lightTheme
theme.load(config: config, dark: isDark)
if isDark {
view.darkTheme = SquirrelTheme()
view.darkTheme.load(config: config, dark: true)
} else {
view.lightTheme = SquirrelTheme()
view.lightTheme.load(config: config, dark: isDark)
}
}
}

Expand Down

0 comments on commit e6cf350

Please sign in to comment.