You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
706 B

# coding: utf-8
from enum import Enum
from qfluentwidgets import StyleSheetBase, Theme, isDarkTheme, qconfig
class StyleSheet(StyleSheetBase, Enum):
""" Style sheet """
LINK_CARD = "link_card"
MAIN_WINDOW = "main_window"
SAMPLE_CARD = "sample_card"
HOME_INTERFACE = "home_interface"
ICON_INTERFACE = "icon_interface"
VIEW_INTERFACE = "view_interface"
SETTING_INTERFACE = "setting_interface"
GALLERY_INTERFACE = "gallery_interface"
NAVIGATION_VIEW_INTERFACE = "navigation_view_interface"
def path(self, theme=Theme.AUTO):
theme = qconfig.theme if theme == Theme.AUTO else theme
return f":/gallery/qss/{theme.value.lower()}/{self.value}.qss"