Support custom themes (#288)
* Remove relief The relief gets stuck on touchscreens * Support custom themes
This commit is contained in:
parent
423d344197
commit
c618044898
@ -130,8 +130,7 @@ class KlipperScreenConfig:
|
||||
{"theme": {
|
||||
"section": "main", "name": _("Icon Theme"), "type": "dropdown",
|
||||
"value": "z-bolt", "callback": screen.restart_warning, "options": [
|
||||
{"name": _("Z-bolt (default)"), "value": "z-bolt"},
|
||||
{"name": _("Colorized"), "value": "colorized"}]}},
|
||||
{"name": "Z-bolt" + " " + _("(default)"), "value": "z-bolt"}]}},
|
||||
{"24htime": {"section": "main", "name": _("24 Hour Time"), "type": "binary", "value": "True"}},
|
||||
{"side_macro_shortcut": {
|
||||
"section": "main", "name": _("Macro shortcut on sidebar"), "type": "binary",
|
||||
@ -153,6 +152,14 @@ class KlipperScreenConfig:
|
||||
for lang in langs:
|
||||
lang_opt.append({"name": lang, "value": lang})
|
||||
|
||||
t_path = os.path.join(os.getcwd(), 'styles')
|
||||
themes = [d for d in os.listdir(t_path) if (not os.path.isfile(os.path.join(t_path, d)) and d != "z-bolt")]
|
||||
themes.sort()
|
||||
theme_opt = self.configurable_options[8]['theme']['options']
|
||||
|
||||
for theme in themes:
|
||||
theme_opt.append({"name": theme, "value": theme})
|
||||
|
||||
index = self.configurable_options.index(
|
||||
[i for i in self.configurable_options if list(i)[0] == "screen_blanking"][0])
|
||||
for num in SCREEN_BLANKING_OPTIONS:
|
||||
|
@ -3,6 +3,7 @@
|
||||
font-size: KS_FONT_SIZEpx;
|
||||
-GtkComboBox-appears-as-list: 0;
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
window {
|
||||
|
Loading…
x
Reference in New Issue
Block a user