Skip to content

Commit

Permalink
Add theme config backward compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
cgjgh committed Nov 12, 2024
1 parent 2d29cf0 commit 2ffd4f8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions nodes/config/ui_theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@
// groups
this.colors.groupBgDark = '#333333'
this.colors.groupOutlineDark = '#cccccc'
} else if (!hasProperty(this.colors, 'surfaceLight')) {
// backward compatability
if (hasProperty(this.colors, 'surface')) {
// set default values for light theme
this.colors.surfaceLight = this.colors.surface
this.colors.primaryLight = this.colors.primary
// pages
this.colors.bgPageLight = this.colors.bgPage
// groups
this.colors.groupBgLight = this.colors.groupBg
this.colors.groupOutlineLight = this.colors.groupOutline

// set default values for dark theme
this.colors.surfaceDark = '#111111'
this.colors.primaryDark = this.colors.primary
// pages
this.colors.bgPageDark = '#222222'
// groups
this.colors.groupBgDark = '#333333'
this.colors.groupOutlineDark = '#cccccc'
}
}

if (!this.sizes) {
Expand Down

0 comments on commit 2ffd4f8

Please sign in to comment.