mirror of
https://github.com/imarkoff/Marble-shell-theme.git
synced 2025-11-21 21:16:00 -08:00
Refactored Theme class to correspond SOLID patterns
This commit is contained in:
0
scripts/types/__init__.py
Normal file
0
scripts/types/__init__.py
Normal file
11
scripts/types/installation_color.py
Normal file
11
scripts/types/installation_color.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Literal
|
||||
|
||||
InstallationMode = Literal["light", "dark"]
|
||||
|
||||
|
||||
@dataclass
|
||||
class InstallationColor:
|
||||
hue: int
|
||||
saturation: int | None
|
||||
modes: list[InstallationMode]
|
||||
12
scripts/types/theme_base.py
Normal file
12
scripts/types/theme_base.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from abc import ABC
|
||||
|
||||
|
||||
class ThemeBase(ABC):
|
||||
"""Base class for theme installation and preparation."""
|
||||
@staticmethod
|
||||
def prepare(self):
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def install(self, hue: int, sat: float | None = None):
|
||||
pass
|
||||
Reference in New Issue
Block a user