Skip to content

Commit

Permalink
fix: 设置默认主题为黑色时,无法真实设置成黑色
Browse files Browse the repository at this point in the history
gsettings set com.deepin.dde.appearance gtk-theme deepin-dark

Log: 主题设置成黑色默认值设置失败
Influence: 默认设置主题为黑色
Task: https://pms.uniontech.com/task-view-348837.html
Change-Id: I5c7ec953d3c0f6ff6e32028faada291bb8b61431
  • Loading branch information
wubw0508 committed May 27, 2024
1 parent 08c1f53 commit 5ab3a0b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions appearance/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,14 @@ func (m *Manager) init() error {
if currentGtkTheme == autoGtkTheme {
m.updateThemeAuto(true)
} else {
if gtkThemes.Get(currentGtkTheme) == nil {
m.GtkTheme.Set(defaultGtkTheme)
err = m.doSetGtkTheme(defaultGtkTheme)
if err != nil {
logger.Warning("failed to set gtk theme:", err)
}
gtkTheme := defaultGtkTheme
if gtkThemes.Get(currentGtkTheme) != nil {
gtkTheme = currentGtkTheme
}
m.GtkTheme.Set(gtkTheme)
err = m.doSetGtkTheme(gtkTheme)
if err != nil {
logger.Warning("failed to set gtk theme:", err)
}
}

Expand Down

0 comments on commit 5ab3a0b

Please sign in to comment.