Files
cutThenThink/src/gui/styles/__init__.py

37 lines
791 B
Python
Raw Normal View History

"""
GUI样式和主题模块
提供颜色方案和主题样式表
"""
from src.gui.styles.colors import ColorScheme, COLORS, get_color
from src.gui.styles.theme import ThemeStyles
# 浏览视图样式(如果存在)
try:
from src.gui.styles.browse_style import (
get_style, get_category_color, get_category_name,
CATEGORY_COLORS, CATEGORY_NAMES
)
_has_browse_style = True
except ImportError:
_has_browse_style = False
__all__ = [
# 颜色和主题
'ColorScheme',
'COLORS',
'get_color',
'ThemeStyles',
]
# 如果浏览样式存在,添加到导出
if _has_browse_style:
__all__.extend([
'get_style',
'get_category_color',
'get_category_name',
'CATEGORY_COLORS',
'CATEGORY_NAMES',
])