diff options
| author | Henry Jameson <me@hjkos.com> | 2020-01-13 00:33:04 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2020-01-13 00:33:04 +0200 |
| commit | 8f63bbb64fa2860e73d8562de9d6c62629a8668f (patch) | |
| tree | ee2066f48a630f1d067bcd4d245fb32f25960fe7 /src/services | |
| parent | 40ba3e225209539639b65c2f636fa1b5af9861ff (diff) | |
poll slot renamed, lightBg customization implemented
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/style_setter/style_setter.js | 4 | ||||
| -rw-r--r-- | src/services/theme_data/theme_data.service.js | 26 |
2 files changed, 29 insertions, 1 deletions
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js index e11516c0..204c162b 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -163,8 +163,10 @@ export const generateColors = (themeData) => { return } if (k === 'faint') { - colors[k + 'Link'].a = v + colors['faintLink'].a = v colors['panelFaint'].a = v + colors['lightBgFaintText'].a = v + colors['lightBgFaintLink'].a = v } if (k === 'bg') { colors['lightBg'].a = v diff --git a/src/services/theme_data/theme_data.service.js b/src/services/theme_data/theme_data.service.js index 21bab1a2..808f67d5 100644 --- a/src/services/theme_data/theme_data.service.js +++ b/src/services/theme_data/theme_data.service.js @@ -12,6 +12,7 @@ export const LAYERS = { badge: null, // no transparency support fg: null, bg: 'underlay', + lightBg: 'bg', panel: 'bg', btn: 'bg', btnPanel: 'panel', @@ -57,6 +58,31 @@ export const SLOT_INHERITANCE = { depends: ['bg'], color: (mod, bg) => brightness(5 * mod, bg).rgb }, + lightBgFaintText: { + depends: ['faint'], + layer: 'lightBg', + textColor: true + }, + lightBgFaintLink: { + depends: ['faintLink'], + layer: 'lightBg', + textColor: 'preserve' + }, + lightBgText: { + depends: ['text'], + layer: 'lightBg', + textColor: true + }, + lightBgLink: { + depends: ['link'], + layer: 'lightBg', + textColor: 'preserve' + }, + lightBgIcon: { + depends: ['lightBg', 'lightBgText'], + color: (mod, bg, text) => mixrgb(bg, text) + }, + lightText: { depends: ['text'], color: (mod, text) => brightness(20 * mod, text).rgb |
