This commit is contained in:
朱子楚\zhuzi
2024-03-07 13:58:23 +08:00
parent 723c2a864a
commit 2a03f24941
19 changed files with 338 additions and 217 deletions

View File

@ -17,8 +17,8 @@ FluTheme::FluTheme(QObject *parent):QObject{parent}{
Q_EMIT darkChanged();
});
connect(this,&FluTheme::darkChanged,this,[=]{refreshColors();});
connect(this,&FluTheme::themeColorChanged,this,[=]{refreshColors();});
themeColor(FluColors::getInstance()->Blue());
connect(this,&FluTheme::accentColorChanged,this,[=]{refreshColors();});
accentColor(FluColors::getInstance()->Blue());
darkMode(FluThemeType::DarkMode::Light);
nativeText(false);
enableAnimation(true);
@ -28,7 +28,7 @@ FluTheme::FluTheme(QObject *parent):QObject{parent}{
void FluTheme::refreshColors(){
auto isDark = dark();
primaryColor(isDark ? _themeColor->lighter() : _themeColor->dark());
primaryColor(isDark ? _accentColor->lighter() : _accentColor->dark());
backgroundColor(isDark ? QColor(0,0,0,255) : QColor(1,1,1,255));
dividerColor(isDark ? QColor(80,80,80,255) : QColor(210,210,210,255));
windowBackgroundColor(isDark ? QColor(32,32,32,255) : QColor(237,237,237,255));