fix broken files after faulty update

This commit is contained in:
2025-01-14 08:51:58 +01:00
parent 598da9bfac
commit 997d618ff1
102 changed files with 2499 additions and 548 deletions

View File

@@ -1,3 +1,4 @@
from .config import Icons
icons = Icons()

59
icons/config.py Normal file
View File

@@ -0,0 +1,59 @@
from omegaconf import OmegaConf, DictConfig
from typing import Optional
import os
import sys
class Icons:
_config: Optional[DictConfig] = None
def __init__(self):
self._config = OmegaConf.load("icons/icons.yaml")
self.config_path = "icons/config.yaml"
def save(self):
OmegaConf.save(self._config, self.config_path)
@property
def icons(self):
return self._config.icons
def get_icon(self, name: str):
return self.icons[name]
def set_icon(self, name: str, value: str):
self._config.icons[name] = value
@property
def path(self):
return self._config.icon_path
@property
def colors(self):
return self._config.colors
@colors.setter
def colors(self, value):
self._config.colors = value
@property
def dark(self):
return self._config.colors.dark
@property
def light(self):
return self._config.colors.light
@property
def warning(self):
return self._config.colors.warning
@property
def success(self):
return self._config.colors.success
def set_color(self, name: str, value: str):
self._config.colors[name] = value
@icons.setter
def icons(self, value):
self._config.icons = value

View File

@@ -1,28 +0,0 @@
icon_path: icons/
dark_color: '#75FB4Cmail'
light_color: '#EA3323'
icons:
locked: locked.svg
logo: logo.ico
show_password: visibility_off.svg
hide_password: visibility_on.svg
settings: settings.svg
today: calendar_today.svg
save: save.svg
edit_note: edit_note.svg
warning: warning.svg
error: error.svg
mail: mail.svg
semester: semester.svg
template_fail: test_fail.svg
offAction: shutdown.svg
info: info.svg
help: help.svg
close: close.svg
notification: notification.svg
valid_true: check_success.svg
valid_false: check_fail.svg
edit: edit.svg
important_warn : red_warn.svg
person: person_add.svg