Skip to content

Commit 3f42377

Browse files
committedMar 20, 2025·
#191 [LS] - Ensure the theme is updated correctly when enabling automatic theme change for posix.
1 parent dbb29af commit 3f42377

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎gui/system_theme_detector_posix.go

+11
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,15 @@ func (cm *colorManager) disableAutomaticThemeChange() {
174174

175175
func (cm *colorManager) enableAutomaticThemeChange() {
176176
cm.onThemeChange.enable()
177+
cm.updateTheme()
178+
}
179+
180+
func (cm *colorManager) updateTheme() {
181+
css := "light-mode-gui"
182+
isDark := cm.isDarkThemeVariant()
183+
if isDark {
184+
css = "dark-mode-gui"
185+
}
186+
187+
cm.ui.addCSSProvider(css)
177188
}

0 commit comments

Comments
 (0)
Please sign in to comment.