HoYoCenter/app/utils.py

10 lines
264 B
Python
Raw Normal View History

import app.env as env
from qfluentwidgets import setTheme, Theme
def switchTheme(theme):
if theme == "dark":
setTheme(Theme.DARK)
env.theme = "dark"
elif theme == "light":
setTheme(Theme.LIGHT)
else:
setTheme(Theme.AUTO)