This commit is contained in:
zhuzichu 2023-11-02 15:33:59 +08:00
parent 20852ac6bf
commit 54b98c8e05
90 changed files with 308 additions and 445 deletions

View File

@ -77,7 +77,7 @@ FluScrollablePage{
Rectangle{ Rectangle{
anchors.fill: parent anchors.fill: parent
radius: 5 radius: 5
color:FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) color:FluTheme.itemHoverColor
visible: item_mouse.containsMouse visible: item_mouse.containsMouse
} }
Rectangle{ Rectangle{
@ -172,17 +172,10 @@ FluScrollablePage{
anchors.fill: parent anchors.fill: parent
radius: 8 radius: 8
color:{ color:{
if(FluTheme.dark){
if(item_mouse.containsMouse){ if(item_mouse.containsMouse){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(item_mouse.containsMouse){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
Image{ Image{
@ -227,7 +220,7 @@ FluScrollablePage{
height: 12 height: 12
width: 12 width: 12
radius: 6 radius: 6
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
anchors{ anchors{
right: parent.right right: parent.right
top: parent.top top: parent.top

View File

@ -35,7 +35,7 @@ FluScrollablePage{
color: FluTheme.dark ? FluColors.Black : FluColors.White color: FluTheme.dark ? FluColors.Black : FluColors.White
FluShadow{ FluShadow{
radius: 4 radius: 4
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
Image{ Image{
id:image id:image

View File

@ -66,7 +66,7 @@ FluScrollablePage{
} }
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color:FluTheme.primaryColor.dark color:FluTheme.primaryColor
} }
} }
} }
@ -78,7 +78,7 @@ FluScrollablePage{
statusMode: FluStatusViewType.Loading statusMode: FluStatusViewType.Loading
Rectangle{ Rectangle{
anchors.fill: parent anchors.fill: parent
color:FluTheme.primaryColor.dark color:FluTheme.primaryColor
} }
}' }'
} }

View File

@ -181,7 +181,7 @@ FluContentPage{
iconSource: FluentIcons.ChevronUp iconSource: FluentIcons.ChevronUp
iconColor: { iconColor: {
if(1 === root.sortType){ if(1 === root.sortType){
return FluTheme.primaryColor.dark return FluTheme.primaryColor
} }
return FluTheme.dark ? Qt.rgba(1,1,1,1) : Qt.rgba(0,0,0,1) return FluTheme.dark ? Qt.rgba(1,1,1,1) : Qt.rgba(0,0,0,1)
} }
@ -202,7 +202,7 @@ FluContentPage{
iconSource: FluentIcons.ChevronDown iconSource: FluentIcons.ChevronDown
iconColor: { iconColor: {
if(2 === root.sortType){ if(2 === root.sortType){
return FluTheme.primaryColor.dark return FluTheme.primaryColor
} }
return FluTheme.dark ? Qt.rgba(1,1,1,1) : Qt.rgba(0,0,0,1) return FluTheme.dark ? Qt.rgba(1,1,1,1) : Qt.rgba(0,0,0,1)
} }

View File

@ -32,7 +32,7 @@ FluScrollablePage{
anchors.centerIn: parent anchors.centerIn: parent
iconSource: FluentIcons.AcceptMedium iconSource: FluentIcons.AcceptMedium
iconSize: 15 iconSize: 15
visible: modelData === FluTheme.primaryColor visible: modelData === FluTheme.themeColor
color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1) color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
} }
MouseArea{ MouseArea{
@ -40,7 +40,7 @@ FluScrollablePage{
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onClicked: { onClicked: {
FluTheme.primaryColor = modelData FluTheme.themeColor = modelData
} }
} }
} }
@ -88,7 +88,7 @@ FluScrollablePage{
CodeExpander{ CodeExpander{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: -1 Layout.topMargin: -1
code:'FluTheme.primaryColor = FluColors.Orange code:'FluTheme.themeColor = FluColors.Orange
FluTheme.dark = true FluTheme.dark = true

View File

@ -2,7 +2,6 @@ import QtQuick 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import QtQuick.Window 2.15 import QtQuick.Window 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import QtGraphicalEffects 1.0
import "qrc:///example/qml/global" import "qrc:///example/qml/global"
import FluentUI 1.0 import FluentUI 1.0
@ -78,7 +77,7 @@ FluScrollablePage{
Rectangle{ Rectangle{
anchors.fill: parent anchors.fill: parent
radius: 5 radius: 5
color:FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) color:FluTheme.itemHoverColor
visible: item_mouse.containsMouse visible: item_mouse.containsMouse
} }
Rectangle{ Rectangle{
@ -173,17 +172,10 @@ FluScrollablePage{
anchors.fill: parent anchors.fill: parent
radius: 8 radius: 8
color:{ color:{
if(FluTheme.dark){
if(item_mouse.containsMouse){ if(item_mouse.containsMouse){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(item_mouse.containsMouse){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
Image{ Image{
@ -228,7 +220,7 @@ FluScrollablePage{
height: 12 height: 12
width: 12 width: 12
radius: 6 radius: 6
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
anchors{ anchors{
right: parent.right right: parent.right
top: parent.top top: parent.top

View File

@ -36,7 +36,7 @@ FluScrollablePage{
color: FluTheme.dark ? FluColors.Black : FluColors.White color: FluTheme.dark ? FluColors.Black : FluColors.White
FluShadow{ FluShadow{
radius: 4 radius: 4
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
Image{ Image{
id:image id:image

View File

@ -67,7 +67,7 @@ FluScrollablePage{
} }
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color:FluTheme.primaryColor.dark color:FluTheme.primaryColor
} }
} }
} }
@ -79,7 +79,7 @@ FluScrollablePage{
statusMode: FluStatusViewType.Loading statusMode: FluStatusViewType.Loading
Rectangle{ Rectangle{
anchors.fill: parent anchors.fill: parent
color:FluTheme.primaryColor.dark color:FluTheme.primaryColor
} }
}' }'
} }

View File

@ -182,7 +182,7 @@ FluContentPage{
iconSource: FluentIcons.ChevronUp iconSource: FluentIcons.ChevronUp
iconColor: { iconColor: {
if(1 === root.sortType){ if(1 === root.sortType){
return FluTheme.primaryColor.dark return FluTheme.primaryColor
} }
return FluTheme.dark ? Qt.rgba(1,1,1,1) : Qt.rgba(0,0,0,1) return FluTheme.dark ? Qt.rgba(1,1,1,1) : Qt.rgba(0,0,0,1)
} }
@ -203,7 +203,7 @@ FluContentPage{
iconSource: FluentIcons.ChevronDown iconSource: FluentIcons.ChevronDown
iconColor: { iconColor: {
if(2 === root.sortType){ if(2 === root.sortType){
return FluTheme.primaryColor.dark return FluTheme.primaryColor
} }
return FluTheme.dark ? Qt.rgba(1,1,1,1) : Qt.rgba(0,0,0,1) return FluTheme.dark ? Qt.rgba(1,1,1,1) : Qt.rgba(0,0,0,1)
} }

View File

@ -33,7 +33,7 @@ FluScrollablePage{
anchors.centerIn: parent anchors.centerIn: parent
iconSource: FluentIcons.AcceptMedium iconSource: FluentIcons.AcceptMedium
iconSize: 15 iconSize: 15
visible: modelData === FluTheme.primaryColor visible: modelData === FluTheme.themeColor
color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1) color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
} }
MouseArea{ MouseArea{
@ -41,7 +41,7 @@ FluScrollablePage{
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onClicked: { onClicked: {
FluTheme.primaryColor = modelData FluTheme.themeColor = modelData
} }
} }
} }
@ -89,7 +89,7 @@ FluScrollablePage{
CodeExpander{ CodeExpander{
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: -1 Layout.topMargin: -1
code:'FluTheme.primaryColor = FluColors.Orange code:'FluTheme.themeColor = FluColors.Orange
FluTheme.dark = true FluTheme.dark = true

View File

@ -16,14 +16,31 @@ FluTheme::FluTheme(QObject *parent):QObject{parent}{
connect(this,&FluTheme::darkModeChanged,this,[=]{ connect(this,&FluTheme::darkModeChanged,this,[=]{
Q_EMIT darkChanged(); Q_EMIT darkChanged();
}); });
primaryColor(FluColors::getInstance()->Blue()); connect(this,&FluTheme::darkChanged,this,[=]{refreshColors();});
connect(this,&FluTheme::themeColorChanged,this,[=]{refreshColors();});
themeColor(FluColors::getInstance()->Blue());
darkMode(FluThemeType::DarkMode::Light);
nativeText(false); nativeText(false);
enableAnimation(true); enableAnimation(true);
darkMode(FluThemeType::DarkMode::Light);
_systemDark = systemDark(); _systemDark = systemDark();
qApp->installEventFilter(this); qApp->installEventFilter(this);
} }
void FluTheme::refreshColors(){
auto isDark = dark();
primaryColor(isDark ? _themeColor->lighter() : _themeColor->dark());
backgroundColor(isDark ? QColor(0,0,0,255) : QColor(1,1,1,255));
windowBackgroundColor(isDark ? QColor(32,32,32,255) : QColor(237,237,237,255));
windowActiveBackgroundColor(isDark ? QColor(26,26,26,255) : QColor(243,243,243,255));
fontPrimaryColor(isDark ? QColor(248,248,248,255) : QColor(7,7,7,255));
fontSecondary(isDark ? QColor(222,222,222,255) : QColor(102,102,102,255));
fontTertiary(isDark ? QColor(200,200,200,255) : QColor(153,153,153,255));
itemNormalColor(isDark ? QColor(255,255,255,0) : QColor(0,0,0,0));
itemHoverColor(isDark ? QColor(255,255,255,255*0.03) : QColor(0,0,0,255*0.03));
itemPressColor(isDark ? QColor(255,255,255,255*0.06) : QColor(0,0,0,255*0.06));
itemCheckColor(isDark ? QColor(255,255,255,255*0.09) : QColor(0,0,0,255*0.09));
}
bool FluTheme::eventFilter(QObject *obj, QEvent *event){ bool FluTheme::eventFilter(QObject *obj, QEvent *event){
Q_UNUSED(obj); Q_UNUSED(obj);
if (event->type() == QEvent::ApplicationPaletteChange || event->type() == QEvent::ThemeChange) if (event->type() == QEvent::ApplicationPaletteChange || event->type() == QEvent::ThemeChange)

View File

@ -5,6 +5,7 @@
#include <QtQml/qqml.h> #include <QtQml/qqml.h>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonObject> #include <QJsonObject>
#include <QColor>
#include "FluColorSet.h" #include "FluColorSet.h"
#include "stdafx.h" #include "stdafx.h"
#include "singleton.h" #include "singleton.h"
@ -16,7 +17,18 @@ class FluTheme : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool dark READ dark NOTIFY darkChanged) Q_PROPERTY(bool dark READ dark NOTIFY darkChanged)
Q_PROPERTY_AUTO(FluColorSet*,primaryColor) Q_PROPERTY_AUTO(FluColorSet*,themeColor);
Q_PROPERTY_AUTO(QColor,primaryColor);
Q_PROPERTY_AUTO(QColor,backgroundColor);
Q_PROPERTY_AUTO(QColor,windowBackgroundColor);
Q_PROPERTY_AUTO(QColor,windowActiveBackgroundColor);
Q_PROPERTY_AUTO(QColor,fontPrimaryColor);
Q_PROPERTY_AUTO(QColor,fontSecondary);
Q_PROPERTY_AUTO(QColor,fontTertiary);
Q_PROPERTY_AUTO(QColor,itemNormalColor);
Q_PROPERTY_AUTO(QColor,itemHoverColor);
Q_PROPERTY_AUTO(QColor,itemPressColor);
Q_PROPERTY_AUTO(QColor,itemCheckColor);
Q_PROPERTY_AUTO(int,darkMode); Q_PROPERTY_AUTO(int,darkMode);
Q_PROPERTY_AUTO(bool,nativeText); Q_PROPERTY_AUTO(bool,nativeText);
Q_PROPERTY_AUTO(bool,enableAnimation); Q_PROPERTY_AUTO(bool,enableAnimation);
@ -26,6 +38,7 @@ private:
explicit FluTheme(QObject *parent = nullptr); explicit FluTheme(QObject *parent = nullptr);
bool eventFilter(QObject *obj, QEvent *event); bool eventFilter(QObject *obj, QEvent *event);
bool systemDark(); bool systemDark();
void refreshColors();
public: public:
SINGLETONG(FluTheme) SINGLETONG(FluTheme)
Q_INVOKABLE QJsonArray awesomeList(const QString& keyword = ""); Q_INVOKABLE QJsonArray awesomeList(const QString& keyword = "");
@ -33,7 +46,6 @@ public:
static FluTheme *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine){return getInstance();} static FluTheme *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine){return getInstance();}
bool dark(); bool dark();
private: private:
bool _dark;
bool _systemDark; bool _systemDark;
}; };

View File

@ -14,12 +14,12 @@ Rectangle{
property string stayTopText : "置顶" property string stayTopText : "置顶"
property string stayTopCancelText : "取消置顶" property string stayTopCancelText : "取消置顶"
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000" property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
property color minimizeNormalColor: Qt.rgba(0,0,0,0) property color minimizeNormalColor: FluTheme.itemNormalColor
property color minimizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) property color minimizeHoverColor: FluTheme.itemHoverColor
property color minimizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06) property color minimizePressColor: FluTheme.itemPressColor
property color maximizeNormalColor: Qt.rgba(0,0,0,0) property color maximizeNormalColor: FluTheme.itemNormalColor
property color maximizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) property color maximizeHoverColor: FluTheme.itemHoverColor
property color maximizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06) property color maximizePressColor: FluTheme.itemPressColor
property color closeNormalColor: Qt.rgba(0,0,0,0) property color closeNormalColor: Qt.rgba(0,0,0,0)
property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1) property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1)
property color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8) property color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8)
@ -32,7 +32,7 @@ Rectangle{
property url icon property url icon
property int iconSize: 20 property int iconSize: 20
property bool isMac: FluTools.isMacos() property bool isMac: FluTools.isMacos()
property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color borerlessColor : FluTheme.primaryColor
property var maxClickListener : function(){ property var maxClickListener : function(){
if (d.win.visibility === Window.Maximized) if (d.win.visibility === Window.Maximized)
d.win.visibility = Window.Windowed d.win.visibility = Window.Windowed
@ -135,7 +135,7 @@ Rectangle{
} }
text:d.stayTop ? control.stayTopCancelText : control.stayTopText text:d.stayTop ? control.stayTopCancelText : control.stayTopText
radius: 0 radius: 0
iconColor: d.stayTop ? (FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark) : control.textColor iconColor: d.stayTop ? FluTheme.primaryColor : control.textColor
onClicked: stayTopClickListener() onClicked: stayTopClickListener()
} }
FluIconButton{ FluIconButton{

View File

@ -65,7 +65,7 @@ Item {
height: 50 height: 50
radius: 25 radius: 25
visible: isYear visible: isYear
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
FluText{ FluText{
text:date.getFullYear() text:date.getFullYear()
@ -124,7 +124,7 @@ Item {
height: 50 height: 50
radius: 25 radius: 25
visible: isMonth visible: isMonth
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
FluText{ FluText{
text:(date.getMonth()+1)+"月" text:(date.getMonth()+1)+"月"
@ -184,7 +184,7 @@ Item {
radius: 18 radius: 18
color:"#00000000" color:"#00000000"
visible: isDay visible: isDay
border.color: FluTheme.primaryColor.dark border.color: FluTheme.primaryColor
border.width: 1 border.width: 1
} }
Rectangle{ Rectangle{
@ -194,7 +194,7 @@ Item {
height: 30 height: 30
radius: 15 radius: 15
visible: isToDay visible: isToDay
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
FluText{ FluText{
text:date.getDate() text:date.getDate()

View File

@ -124,9 +124,9 @@ Item {
radius: 4 radius: 4
} }
scale: checked ? 1.2 : 1 scale: checked ? 1.2 : 1
color: checked ? FluTheme.primaryColor.dark : Qt.rgba(1,1,1,0.7) color: checked ? FluTheme.primaryColor : Qt.rgba(1,1,1,0.7)
border.width: mouse_item.containsMouse ? 1 : 0 border.width: mouse_item.containsMouse ? 1 : 0
border.color: FluTheme.primaryColor.dark border.color: FluTheme.primaryColor
MouseArea{ MouseArea{
id:mouse_item id:mouse_item
hoverEnabled: true hoverEnabled: true

View File

@ -7,12 +7,12 @@ Button {
property bool disabled: false property bool disabled: false
property string contentDescription: "" property string contentDescription: ""
property color borderNormalColor: FluTheme.dark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1) property color borderNormalColor: FluTheme.dark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1)
property color bordercheckedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color bordercheckedColor: FluTheme.primaryColor
property color borderHoverColor: FluTheme.dark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1) property color borderHoverColor: FluTheme.dark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1)
property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1) property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
property color borderPressedColor: FluTheme.dark ? Qt.rgba(90/255,90/255,90/255,1) : Qt.rgba(191/255,191/255,191/255,1) property color borderPressedColor: FluTheme.dark ? Qt.rgba(90/255,90/255,90/255,1) : Qt.rgba(191/255,191/255,191/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(247/255,247/255,247/255,1) property color normalColor: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(247/255,247/255,247/255,1)
property color checkedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color checkedColor: FluTheme.primaryColor
property color hoverColor: FluTheme.dark ? Qt.rgba(72/255,72/255,72/255,1) : Qt.rgba(236/255,236/255,236/255,1) property color hoverColor: FluTheme.dark ? Qt.rgba(72/255,72/255,72/255,1) : Qt.rgba(236/255,236/255,236/255,1)
property color checkedHoverColor: FluTheme.dark ? Qt.darker(checkedColor,1.15) : Qt.lighter(checkedColor,1.15) property color checkedHoverColor: FluTheme.dark ? Qt.darker(checkedColor,1.15) : Qt.lighter(checkedColor,1.15)
property color checkedPreesedColor: FluTheme.dark ? Qt.darker(checkedColor,1.3) : Qt.lighter(checkedColor,1.3) property color checkedPreesedColor: FluTheme.dark ? Qt.darker(checkedColor,1.3) : Qt.lighter(checkedColor,1.3)

View File

@ -19,7 +19,7 @@ Button{
color:"#00000000" color:"#00000000"
border.color: { border.color: {
if(hovered) if(hovered)
return FluTheme.primaryColor.light return FluTheme.primaryColor
return FluTheme.dark ? Qt.rgba(100/255,100/255,100/255,1) : Qt.rgba(200/255,200/255,200/255,1) return FluTheme.dark ? Qt.rgba(100/255,100/255,100/255,1) : Qt.rgba(200/255,200/255,200/255,1)
} }
border.width: 1 border.width: 1

View File

@ -45,7 +45,7 @@ T.ComboBox {
topPadding: 6 - control.padding topPadding: 6 - control.padding
bottomPadding: 6 - control.padding bottomPadding: 6 - control.padding
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color selectedTextColor: color
text: control.editable ? control.editText : control.displayText text: control.editable ? control.editText : control.displayText
enabled: control.editable enabled: control.editable

View File

@ -17,7 +17,7 @@ TextEdit {
selectByMouse: true selectByMouse: true
selectedTextColor: color selectedTextColor: color
bottomPadding: 0 bottomPadding: 0
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
font:FluTextStyle.Body font:FluTextStyle.Body
onSelectedTextChanged: { onSelectedTextChanged: {
control.forceActiveFocus() control.forceActiveFocus()

View File

@ -169,11 +169,7 @@ Rectangle {
anchors.rightMargin: 5 anchors.rightMargin: 5
color: { color: {
if(getListView().currentIndex === position){ if(getListView().currentIndex === position){
if(FluTheme.dark){ return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor.lighter,1.1) : FluTheme.primaryColor.lighter
}else{
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor.dark,1.1): FluTheme.primaryColor.dark
}
} }
if(item_mouse.containsMouse){ if(item_mouse.containsMouse){
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1) return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)

View File

@ -5,7 +5,7 @@ import FluentUI 1.0
Button { Button {
property bool disabled: false property bool disabled: false
property string contentDescription: "" property string contentDescription: ""
property color normalColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color normalColor: FluTheme.primaryColor
property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.1) : Qt.lighter(normalColor,1.1) property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.1) : Qt.lighter(normalColor,1.1)
property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1) property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.2) : Qt.lighter(normalColor,1.2) property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.2) : Qt.lighter(normalColor,1.2)

View File

@ -10,10 +10,10 @@ Button {
property bool disabled: false property bool disabled: false
property int radius:4 property int radius:4
property string contentDescription: "" property string contentDescription: ""
property color hoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) property color hoverColor: FluTheme.itemHoverColor
property color pressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06) property color pressedColor: FluTheme.itemPressColor
property color normalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0) property color normalColor: FluTheme.itemNormalColor
property color disableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0) property color disableColor: FluTheme.itemNormalColor
property Component iconDelegate: com_icon property Component iconDelegate: com_icon
property color color: { property color color: {
if(!enabled){ if(!enabled){

View File

@ -26,7 +26,7 @@ Image {
Component{ Component{
id:com_loading id:com_loading
Rectangle{ Rectangle{
color: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) color: FluTheme.itemHoverColor
FluProgressRing{ FluProgressRing{
anchors.centerIn: parent anchors.centerIn: parent
visible: control.status === Image.Loading visible: control.status === Image.Loading
@ -36,7 +36,7 @@ Image {
Component{ Component{
id:com_error id:com_error
Rectangle{ Rectangle{
color: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) color: FluTheme.itemHoverColor
FluFilledButton{ FluFilledButton{
text: control.errorButtonText text: control.errorButtonText
anchors.centerIn: parent anchors.centerIn: parent

View File

@ -170,7 +170,7 @@ FluObject {
switch(_super.type){ switch(_super.type){
case mcontrol.const_success: return Qt.rgba(108/255,203/255,95/255,1); case mcontrol.const_success: return Qt.rgba(108/255,203/255,95/255,1);
case mcontrol.const_warning: return Qt.rgba(252/255,225/255,0/255,1); case mcontrol.const_warning: return Qt.rgba(252/255,225/255,0/255,1);
case mcontrol.const_info: return FluTheme.primaryColor.lighter; case mcontrol.const_info: return FluTheme.primaryColor;
case mcontrol.const_error: return Qt.rgba(255/255,153/255,164/255,1); case mcontrol.const_error: return Qt.rgba(255/255,153/255,164/255,1);
} }
return "#FFFFFF" return "#FFFFFF"
@ -213,7 +213,7 @@ FluObject {
switch(_super.type){ switch(_super.type){
case mcontrol.const_success: return Qt.rgba(108/255,203/255,95/255,1); case mcontrol.const_success: return Qt.rgba(108/255,203/255,95/255,1);
case mcontrol.const_warning: return Qt.rgba(252/255,225/255,0/255,1); case mcontrol.const_warning: return Qt.rgba(252/255,225/255,0/255,1);
case mcontrol.const_info: return FluTheme.primaryColor.lighter; case mcontrol.const_info: return FluTheme.primaryColor;
case mcontrol.const_error: return Qt.rgba(255/255,153/255,164/255,1); case mcontrol.const_error: return Qt.rgba(255/255,153/255,164/255,1);
} }
return "#FFFFFF" return "#FFFFFF"

View File

@ -47,23 +47,13 @@ T.MenuBarItem {
implicitHeight: 30 implicitHeight: 30
radius: 3 radius: 3
color: { color: {
if(FluTheme.dark){
if(control.highlighted){ if(control.highlighted){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
} }
if(control.hovered){ if(control.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(control.highlighted){
return Qt.rgba(0,0,0,0.06)
}
if(control.hovered){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
} }

View File

@ -98,17 +98,10 @@ T.MenuItem {
anchors.margins: 3 anchors.margins: 3
radius: 4 radius: 4
color:{ color:{
if(FluTheme.dark){
if(control.highlighted){ if(control.highlighted){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
}
return Qt.rgba(0,0,0,0)
}else{
if(control.highlighted){
return Qt.rgba(0,0,0,0.06)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
} }

View File

@ -24,7 +24,7 @@ TextArea{
leftPadding: padding+4 leftPadding: padding+4
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectedTextColor: color selectedTextColor: color
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
placeholderTextColor: { placeholderTextColor: {
if(!enabled){ if(!enabled){
return placeholderDisableColor return placeholderDisableColor

View File

@ -239,7 +239,7 @@ Item {
width: 3 width: 3
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
visible: { visible: {
if(!model){ if(!model){
return false return false
@ -291,25 +291,15 @@ Item {
} }
color: { color: {
if(!item_control.enabled){ if(!item_control.enabled){
return Qt.rgba(0,0,0,0) return FluTheme.itemNormalColor
} }
if(FluTheme.dark){
if((nav_list.currentIndex === _idx)&&type===0){
return Qt.rgba(1,1,1,0.06)
}
if(item_control.hovered){
return Qt.rgba(1,1,1,0.03)
}
return Qt.rgba(0,0,0,0)
}else{
if(nav_list.currentIndex === _idx&&type===0){ if(nav_list.currentIndex === _idx&&type===0){
return Qt.rgba(0,0,0,0.06) return FluTheme.itemCheckColor
} }
if(item_control.hovered){ if(item_control.hovered){
return Qt.rgba(0,0,0,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
Component{ Component{
id:com_icon id:com_icon
@ -513,37 +503,21 @@ Item {
anchors.fill: parent anchors.fill: parent
color: { color: {
if(!item_control.enabled){ if(!item_control.enabled){
return Qt.rgba(0,0,0,0) return FluTheme.itemNormalColor
} }
if(FluTheme.dark){
if(type===0){ if(type===0){
if(nav_list.currentIndex === _idx){ if(nav_list.currentIndex === _idx){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
} }
}else{ }else{
if(nav_list.currentIndex === (nav_list.count-layout_footer.count+_idx)){ if(nav_list.currentIndex === (nav_list.count-layout_footer.count+_idx)){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
} }
} }
if(item_control.hovered){ if(item_control.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(type===0){
if(nav_list.currentIndex === _idx){
return Qt.rgba(0,0,0,0.06)
}
}else{
if(nav_list.currentIndex === (nav_list.count-layout_footer.count+_idx)){
return Qt.rgba(0,0,0,0.06)
}
}
if(item_control.hovered){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
Component{ Component{
id:com_icon id:com_icon
@ -953,9 +927,6 @@ Item {
} }
FluIconButton{ FluIconButton{
visible:d.isCompactAndNotPanel visible:d.isCompactAndNotPanel
hoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
pressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
normalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
width:38 width:38
height:34 height:34
x:6 x:6
@ -1004,7 +975,7 @@ Item {
Rectangle{ Rectangle{
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
width: 3 width: 3
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
@ -1062,7 +1033,7 @@ Item {
Rectangle{ Rectangle{
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
width: 3 width: 3
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
@ -1126,17 +1097,10 @@ Item {
focusPolicy:Qt.TabFocus focusPolicy:Qt.TabFocus
background: Rectangle{ background: Rectangle{
color: { color: {
if(FluTheme.dark){
if(item_button.hovered){ if(item_button.hovered){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(item_button.hovered){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
FluFocusRectangle{ FluFocusRectangle{
visible: item_button.activeFocus visible: item_button.activeFocus

View File

@ -25,7 +25,7 @@ TextField{
leftPadding: padding+4 leftPadding: padding+4
echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color selectedTextColor: color
placeholderTextColor: { placeholderTextColor: {
if(!enabled){ if(!enabled){

View File

@ -36,7 +36,7 @@ Page {
Rectangle{ Rectangle{
height: 3 height: 3
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
width: nav_list.currentItem ? nav_list.currentItem.width : 0 width: nav_list.currentItem ? nav_list.currentItem.width : 0
y:d.tabY y:d.tabY
Behavior on width { Behavior on width {

View File

@ -5,7 +5,7 @@ import FluentUI 1.0
ProgressBar{ ProgressBar{
property real strokeWidth: 6 property real strokeWidth: 6
property bool progressVisible: false property bool progressVisible: false
property color color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color color: FluTheme.primaryColor
property color backgroundColor : FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1) property color backgroundColor : FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1)
id:control id:control
indeterminate : true indeterminate : true

View File

@ -12,7 +12,7 @@ Button {
} }
property color normalColor: { property color normalColor: {
if(d.checked){ if(d.checked){
return FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark return FluTheme.primaryColor
}else{ }else{
return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1) return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)
} }
@ -66,7 +66,7 @@ Button {
width: parent.width * control.progress width: parent.width * control.progress
height: control.progress === 1 ? background.height : 3 height: control.progress === 1 ? background.height : 3
visible: !d.checked visible: !d.checked
color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark color: FluTheme.primaryColor
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
Behavior on height{ Behavior on height{
enabled: control.progress !== 1 enabled: control.progress !== 1

View File

@ -6,7 +6,7 @@ import FluentUI 1.0
ProgressBar{ ProgressBar{
property real strokeWidth: 6 property real strokeWidth: 6
property bool progressVisible: false property bool progressVisible: false
property color color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color color: FluTheme.primaryColor
property color backgroundColor : FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1) property color backgroundColor : FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1)
id:control id:control
indeterminate : true indeterminate : true

View File

@ -6,7 +6,7 @@ import FluentUI 1.0
Button { Button {
property string contentDescription: "" property string contentDescription: ""
property bool disabled: false property bool disabled: false
property color borderNormalColor: checked ? FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark : FluTheme.dark ? Qt.rgba(161/255,161/255,161/255,1) : Qt.rgba(141/255,141/255,141/255,1) property color borderNormalColor: checked ? FluTheme.primaryColor : FluTheme.dark ? Qt.rgba(161/255,161/255,161/255,1) : Qt.rgba(141/255,141/255,141/255,1)
property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(198/255,198/255,198/255,1) property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(198/255,198/255,198/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1)
property color hoverColor: checked ? FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1) property color hoverColor: checked ? FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)

View File

@ -41,7 +41,7 @@ T.RangeSlider {
} }
return control.first.hovered ? 1.2 : 1 return control.first.hovered ? 1.2 : 1
} }
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark iconColor: FluTheme.primaryColor
anchors.centerIn: parent anchors.centerIn: parent
Behavior on scale{ Behavior on scale{
NumberAnimation{ NumberAnimation{
@ -72,7 +72,7 @@ T.RangeSlider {
} }
return control.second.hovered ? 1.2 : 1 return control.second.hovered ? 1.2 : 1
} }
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark iconColor: FluTheme.primaryColor
anchors.centerIn: parent anchors.centerIn: parent
Behavior on scale{ Behavior on scale{
NumberAnimation{ NumberAnimation{
@ -101,7 +101,7 @@ T.RangeSlider {
y: control.horizontal ? 0 : control.second.visualPosition * parent.height + 3 y: control.horizontal ? 0 : control.second.visualPosition * parent.height + 3
width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 6 : 6 width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 6 : 6
height: control.horizontal ? 6 : control.second.position * parent.height - control.first.position * parent.height - 6 height: control.horizontal ? 6 : control.second.position * parent.height - control.first.position * parent.height - 6
color:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
} }
FluTooltip{ FluTooltip{

View File

@ -32,7 +32,7 @@ Item {
} }
iconSize: control.size iconSize: control.size
iconSource: isSelected ? FluentIcons.FavoriteStarFill : FluentIcons.FavoriteStar iconSource: isSelected ? FluentIcons.FavoriteStarFill : FluentIcons.FavoriteStar
iconColor: isSelected ? FluTheme.primaryColor.dark : (FluTheme.dark ? "#FFFFFF" : "#000000") iconColor: isSelected ? FluTheme.primaryColor : (FluTheme.dark ? "#FFFFFF" : "#000000")
anchors.centerIn: parent anchors.centerIn: parent
} }
} }

View File

@ -11,7 +11,7 @@ Item{
property int dotSize: 5 property int dotSize: 5
property int borderSize: 1 property int borderSize: 1
property var saveFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0] property var saveFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
property color borderColor: FluTheme.primaryColor.dark property color borderColor: FluTheme.primaryColor
signal captrueCompleted(var captrue) signal captrueCompleted(var captrue)
QtObject{ QtObject{
id:d id:d
@ -508,7 +508,7 @@ Item{
} }
FluIconButton{ FluIconButton{
iconSource: FluentIcons.AcceptMedium iconSource: FluentIcons.AcceptMedium
iconColor: FluTheme.primaryColor.dark iconColor: FluTheme.primaryColor
onClicked: { onClicked: {
screenshot_background.capture(screenshot.start,screenshot.end) screenshot_background.capture(screenshot.start,screenshot.end)
} }

View File

@ -39,7 +39,7 @@ T.Slider {
} }
return control.hovered ? 1.2 : 1 return control.hovered ? 1.2 : 1
} }
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark iconColor: FluTheme.primaryColor
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
@ -62,7 +62,7 @@ T.Slider {
width: control.horizontal ? control.position * parent.width : 6 width: control.horizontal ? control.position * parent.width : 6
height: control.horizontal ? 6 : control.position * parent.height height: control.horizontal ? 6 : control.position * parent.height
radius: 3 radius: 3
color:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
} }
FluTooltip{ FluTooltip{

View File

@ -39,7 +39,7 @@ T.SpinBox {
} }
return normalColor return normalColor
} }
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color selectedTextColor: color
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
@ -52,10 +52,13 @@ T.SpinBox {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: contentItem.enabled visible: contentItem.enabled
color: { color: {
if(contentItem.activeFocus){
return FluTheme.primaryColor
}
if(FluTheme.dark){ if(FluTheme.dark){
contentItem.activeFocus ? FluTheme.primaryColor.lighter : Qt.rgba(166/255,166/255,166/255,1) return Qt.rgba(166/255,166/255,166/255,1)
}else{ }else{
return contentItem.activeFocus ? FluTheme.primaryColor.dark : Qt.rgba(183/255,183/255,183/255,1) return Qt.rgba(183/255,183/255,183/255,1)
} }
} }
Behavior on height{ Behavior on height{

View File

@ -189,23 +189,13 @@ Item {
anchors.fill: parent anchors.fill: parent
radius: [6,6,0,0] radius: [6,6,0,0]
color: { color: {
if(FluTheme.dark){
if(item_mouse_hove.containsMouse || item_btn_close.hovered){ if(item_mouse_hove.containsMouse || item_btn_close.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
} }
if(tab_nav.currentIndex === index){ if(tab_nav.currentIndex === index){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
}
return Qt.rgba(0,0,0,0)
}else{
if(item_mouse_hove.containsMouse || item_btn_close.hovered){
return Qt.rgba(0,0,0,0.03)
}
if(tab_nav.currentIndex === index){
return Qt.rgba(0,0,0,0.06)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
RowLayout{ RowLayout{

View File

@ -269,7 +269,7 @@ Rectangle {
Rectangle{ Rectangle{
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
width: 3 width: 3
visible: d.currentRow === table_model.getRow(row).__index && column === 0 visible: d.currentRow === table_model.getRow(row).__index && column === 0
anchors{ anchors{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls 2.15
import FluentUI 1.0 import FluentUI 1.0
Text { Text {
property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220 property color textColor: FluTheme.fontPrimaryColor
id:text id:text
color: textColor color: textColor
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering

View File

@ -25,7 +25,7 @@ TextField{
} }
font:FluTextStyle.Body font:FluTextStyle.Body
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color selectedTextColor: color
placeholderTextColor: { placeholderTextColor: {
if(!enabled){ if(!enabled){

View File

@ -36,10 +36,13 @@ FluClip{
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: !inputItem.disabled visible: !inputItem.disabled
color: { color: {
if(inputItem.activeFocus){
return FluTheme.primaryColor
}
if(FluTheme.dark){ if(FluTheme.dark){
return inputItem.activeFocus ? FluTheme.primaryColor.lighter : Qt.rgba(166/255,166/255,166/255,1) return Qt.rgba(166/255,166/255,166/255,1)
}else{ }else{
return inputItem.activeFocus ? FluTheme.primaryColor.dark : Qt.rgba(134/255,134/255,134/255,1) return Qt.rgba(134/255,134/255,134/255,1)
} }
} }
Behavior on height{ Behavior on height{

View File

@ -5,14 +5,14 @@ import FluentUI 1.0
Button { Button {
property bool disabled: false property bool disabled: false
property string contentDescription: "" property string contentDescription: ""
property color normalColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color normalColor: FluTheme.primaryColor
property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.15) : Qt.lighter(normalColor,1.15) property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.15) : Qt.lighter(normalColor,1.15)
property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.3) : Qt.lighter(normalColor,1.3) property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.3) : Qt.lighter(normalColor,1.3)
property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1) property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
property color backgroundHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) property color backgroundHoverColor: FluTheme.itemHoverColor
property color backgroundPressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06) property color backgroundPressedColor: FluTheme.itemPressColor
property color backgroundNormalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0) property color backgroundNormalColor: FluTheme.itemNormalColor
property color backgroundDisableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0) property color backgroundDisableColor: FluTheme.itemNormalColor
property bool textBold: true property bool textBold: true
property color textColor: { property color textColor: {
if(!enabled){ if(!enabled){

View File

@ -184,11 +184,7 @@ Rectangle {
anchors.rightMargin: 5 anchors.rightMargin: 5
color: { color: {
if(getListView().currentIndex === position){ if(getListView().currentIndex === position){
if(FluTheme.dark){ return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor.lighter,1.1) : FluTheme.primaryColor.lighter
}else{
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor.dark,1.1): FluTheme.primaryColor.dark
}
} }
if(item_mouse.containsMouse){ if(item_mouse.containsMouse){
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1) return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)

View File

@ -82,7 +82,7 @@ Item{
radius: 8 radius: 8
border.width: 4 border.width: 4
color:FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1) color:FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
border.color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark border.color: FluTheme.primaryColor
} }
} }
@ -92,7 +92,7 @@ Item{
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: modelData.lable text: modelData.lable
color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
} }

View File

@ -7,7 +7,7 @@ Button {
property string contentDescription: "" property string contentDescription: ""
property color normalColor: { property color normalColor: {
if(checked){ if(checked){
return FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark return FluTheme.primaryColor
}else{ }else{
return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1) return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)
} }

View File

@ -7,11 +7,11 @@ Button {
property bool disabled: false property bool disabled: false
property string contentDescription: "" property string contentDescription: ""
property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(233/255,233/255,233/255,1) property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(233/255,233/255,233/255,1)
property color checkColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color checkColor: FluTheme.primaryColor
property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(240/255,240/255,240/255,1) property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(240/255,240/255,240/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1) property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1)
property color borderNormalColor: FluTheme.dark ? Qt.rgba(161/255,161/255,161/255,1) : Qt.rgba(141/255,141/255,141/255,1) property color borderNormalColor: FluTheme.dark ? Qt.rgba(161/255,161/255,161/255,1) : Qt.rgba(141/255,141/255,141/255,1)
property color borderCheckColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color borderCheckColor: FluTheme.primaryColor
property color borderDisableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(200/255,200/255,200/255,1) property color borderDisableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(200/255,200/255,200/255,1)
property color dotNormalColor: FluTheme.dark ? Qt.rgba(208/255,208/255,208/255,1) : Qt.rgba(93/255,93/255,93/255,1) property color dotNormalColor: FluTheme.dark ? Qt.rgba(208/255,208/255,208/255,1) : Qt.rgba(93/255,93/255,93/255,1)
property color dotCheckColor: FluTheme.dark ? Qt.rgba(0/255,0/255,0/255,1) : Qt.rgba(255/255,255/255,255/255,1) property color dotCheckColor: FluTheme.dark ? Qt.rgba(0/255,0/255,0/255,1) : Qt.rgba(255/255,255/255,255/255,1)

View File

@ -22,7 +22,7 @@ Item {
property int dropIndex: -1 property int dropIndex: -1
property bool isDropTopArea: false property bool isDropTopArea: false
property int dragIndex: -1 property int dragIndex: -1
property color hitColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color hitColor: FluTheme.primaryColor
} }
onDataSourceChanged: { onDataSourceChanged: {
tree_model.setDataSource(dataSource) tree_model.setDataSource(dataSource)
@ -138,7 +138,7 @@ Item {
width: 3 width: 3
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
visible: isCurrent visible: isCurrent
anchors{ anchors{
left: parent.left left: parent.left
@ -322,29 +322,16 @@ Item {
border.color: d.hitColor border.color: d.hitColor
border.width: d.dragIndex === rowIndex ? 1 : 0 border.width: d.dragIndex === rowIndex ? 1 : 0
color: { color: {
if(FluTheme.dark){
if(isCurrent){ if(isCurrent){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
} }
if(item_mouse.containsMouse || item_check_box.hovered){ if(item_mouse.containsMouse || item_check_box.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
} }
if(item_loader_expand.item && item_loader_expand.item.hovered){ if(item_loader_expand.item && item_loader_expand.item.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(isCurrent){
return Qt.rgba(0,0,0,0.06)
}
if(item_mouse.containsMouse || item_check_box.hovered){
return Qt.rgba(0,0,0,0.03)
}
if(item_loader_expand.item && item_loader_expand.item.hovered){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
RowLayout{ RowLayout{

View File

@ -16,9 +16,9 @@ Window {
property var appBar: com_app_bar property var appBar: com_app_bar
property color backgroundColor: { property color backgroundColor: {
if(active){ if(active){
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1) return FluTheme.windowActiveBackgroundColor
} }
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(237/255,237/255,237/255,1) return FluTheme.windowBackgroundColor
} }
property bool stayTop: false property bool stayTop: false
property var _pageRegister property var _pageRegister

View File

@ -14,12 +14,12 @@ Rectangle{
property string stayTopText : "置顶" property string stayTopText : "置顶"
property string stayTopCancelText : "取消置顶" property string stayTopCancelText : "取消置顶"
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000" property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
property color minimizeNormalColor: Qt.rgba(0,0,0,0) property color minimizeNormalColor: FluTheme.itemNormalColor
property color minimizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) property color minimizeHoverColor: FluTheme.itemHoverColor
property color minimizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06) property color minimizePressColor: FluTheme.itemPressColor
property color maximizeNormalColor: Qt.rgba(0,0,0,0) property color maximizeNormalColor: FluTheme.itemNormalColor
property color maximizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) property color maximizeHoverColor: FluTheme.itemHoverColor
property color maximizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06) property color maximizePressColor: FluTheme.itemPressColor
property color closeNormalColor: Qt.rgba(0,0,0,0) property color closeNormalColor: Qt.rgba(0,0,0,0)
property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1) property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1)
property color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8) property color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8)
@ -32,7 +32,7 @@ Rectangle{
property url icon property url icon
property int iconSize: 20 property int iconSize: 20
property bool isMac: FluTools.isMacos() property bool isMac: FluTools.isMacos()
property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color borerlessColor : FluTheme.primaryColor
property var maxClickListener : function(){ property var maxClickListener : function(){
if (d.win.visibility === Window.Maximized) if (d.win.visibility === Window.Maximized)
d.win.visibility = Window.Windowed d.win.visibility = Window.Windowed
@ -135,7 +135,7 @@ Rectangle{
} }
text:d.stayTop ? control.stayTopCancelText : control.stayTopText text:d.stayTop ? control.stayTopCancelText : control.stayTopText
radius: 0 radius: 0
iconColor: d.stayTop ? (FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark) : control.textColor iconColor: d.stayTop ? FluTheme.primaryColor : control.textColor
onClicked: stayTopClickListener() onClicked: stayTopClickListener()
} }
FluIconButton{ FluIconButton{

View File

@ -65,7 +65,7 @@ Item {
height: 50 height: 50
radius: 25 radius: 25
visible: isYear visible: isYear
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
FluText{ FluText{
text:date.getFullYear() text:date.getFullYear()
@ -124,7 +124,7 @@ Item {
height: 50 height: 50
radius: 25 radius: 25
visible: isMonth visible: isMonth
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
FluText{ FluText{
text:(date.getMonth()+1)+"月" text:(date.getMonth()+1)+"月"
@ -184,7 +184,7 @@ Item {
radius: 18 radius: 18
color:"#00000000" color:"#00000000"
visible: isDay visible: isDay
border.color: FluTheme.primaryColor.dark border.color: FluTheme.primaryColor
border.width: 1 border.width: 1
} }
Rectangle{ Rectangle{
@ -194,7 +194,7 @@ Item {
height: 30 height: 30
radius: 15 radius: 15
visible: isToDay visible: isToDay
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
FluText{ FluText{
text:date.getDate() text:date.getDate()

View File

@ -124,9 +124,9 @@ Item {
radius: 4 radius: 4
} }
scale: checked ? 1.2 : 1 scale: checked ? 1.2 : 1
color: checked ? FluTheme.primaryColor.dark : Qt.rgba(1,1,1,0.7) color: checked ? FluTheme.primaryColor : Qt.rgba(1,1,1,0.7)
border.width: mouse_item.containsMouse ? 1 : 0 border.width: mouse_item.containsMouse ? 1 : 0
border.color: FluTheme.primaryColor.dark border.color: FluTheme.primaryColor
MouseArea{ MouseArea{
id:mouse_item id:mouse_item
hoverEnabled: true hoverEnabled: true

View File

@ -1,6 +1,5 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts import QtQuick.Layouts
import FluentUI import FluentUI
@ -8,12 +7,12 @@ Button {
property bool disabled: false property bool disabled: false
property string contentDescription: "" property string contentDescription: ""
property color borderNormalColor: FluTheme.dark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1) property color borderNormalColor: FluTheme.dark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1)
property color bordercheckedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color bordercheckedColor: FluTheme.primaryColor
property color borderHoverColor: FluTheme.dark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1) property color borderHoverColor: FluTheme.dark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1)
property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1) property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
property color borderPressedColor: FluTheme.dark ? Qt.rgba(90/255,90/255,90/255,1) : Qt.rgba(191/255,191/255,191/255,1) property color borderPressedColor: FluTheme.dark ? Qt.rgba(90/255,90/255,90/255,1) : Qt.rgba(191/255,191/255,191/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(247/255,247/255,247/255,1) property color normalColor: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(247/255,247/255,247/255,1)
property color checkedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color checkedColor: FluTheme.primaryColor
property color hoverColor: FluTheme.dark ? Qt.rgba(72/255,72/255,72/255,1) : Qt.rgba(236/255,236/255,236/255,1) property color hoverColor: FluTheme.dark ? Qt.rgba(72/255,72/255,72/255,1) : Qt.rgba(236/255,236/255,236/255,1)
property color checkedHoverColor: FluTheme.dark ? Qt.darker(checkedColor,1.15) : Qt.lighter(checkedColor,1.15) property color checkedHoverColor: FluTheme.dark ? Qt.darker(checkedColor,1.15) : Qt.lighter(checkedColor,1.15)
property color checkedPreesedColor: FluTheme.dark ? Qt.darker(checkedColor,1.3) : Qt.lighter(checkedColor,1.3) property color checkedPreesedColor: FluTheme.dark ? Qt.darker(checkedColor,1.3) : Qt.lighter(checkedColor,1.3)
@ -31,6 +30,11 @@ Button {
id:control id:control
enabled: !disabled enabled: !disabled
onClicked: clickListener() onClicked: clickListener()
onCheckableChanged: {
if(checkable){
checkable = false
}
}
background: Item{ background: Item{
FluFocusRectangle{ FluFocusRectangle{
radius: 4 radius: 4

View File

@ -1,6 +1,5 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
@ -20,7 +19,7 @@ Button{
color:"#00000000" color:"#00000000"
border.color: { border.color: {
if(hovered) if(hovered)
return FluTheme.primaryColor.light return FluTheme.primaryColor
return FluTheme.dark ? Qt.rgba(100/255,100/255,100/255,1) : Qt.rgba(200/255,200/255,200/255,1) return FluTheme.dark ? Qt.rgba(100/255,100/255,100/255,1) : Qt.rgba(200/255,200/255,200/255,1)
} }
border.width: 1 border.width: 1
@ -31,6 +30,7 @@ Button{
radius: 5 radius: 5
color: control.colorValue color: control.colorValue
} }
} }
Item{ Item{
id: d id: d

View File

@ -45,7 +45,7 @@ T.ComboBox {
topPadding: 6 - control.padding topPadding: 6 - control.padding
bottomPadding: 6 - control.padding bottomPadding: 6 - control.padding
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color selectedTextColor: color
text: control.editable ? control.editText : control.displayText text: control.editable ? control.editText : control.displayText
enabled: control.editable enabled: control.editable

View File

@ -17,7 +17,7 @@ TextEdit {
selectByMouse: true selectByMouse: true
selectedTextColor: color selectedTextColor: color
bottomPadding: 0 bottomPadding: 0
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
font:FluTextStyle.Body font:FluTextStyle.Body
onSelectedTextChanged: { onSelectedTextChanged: {
control.forceActiveFocus() control.forceActiveFocus()

View File

@ -169,11 +169,7 @@ Rectangle {
anchors.rightMargin: 5 anchors.rightMargin: 5
color: { color: {
if(getListView().currentIndex === position){ if(getListView().currentIndex === position){
if(FluTheme.dark){ return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor.lighter,1.1) : FluTheme.primaryColor.lighter
}else{
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor.dark,1.1): FluTheme.primaryColor.dark
}
} }
if(item_mouse.containsMouse){ if(item_mouse.containsMouse){
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1) return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)

View File

@ -6,7 +6,7 @@ import FluentUI
Button { Button {
property bool disabled: false property bool disabled: false
property string contentDescription: "" property string contentDescription: ""
property color normalColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color normalColor: FluTheme.primaryColor
property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.1) : Qt.lighter(normalColor,1.1) property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.1) : Qt.lighter(normalColor,1.1)
property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1) property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.2) : Qt.lighter(normalColor,1.2) property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.2) : Qt.lighter(normalColor,1.2)

View File

@ -11,10 +11,10 @@ Button {
property bool disabled: false property bool disabled: false
property int radius:4 property int radius:4
property string contentDescription: "" property string contentDescription: ""
property color hoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) property color hoverColor: FluTheme.itemHoverColor
property color pressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06) property color pressedColor: FluTheme.itemPressColor
property color normalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0) property color normalColor: FluTheme.itemNormalColor
property color disableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0) property color disableColor: FluTheme.itemNormalColor
property Component iconDelegate: com_icon property Component iconDelegate: com_icon
property color color: { property color color: {
if(!enabled){ if(!enabled){

View File

@ -26,7 +26,7 @@ Image {
Component{ Component{
id:com_loading id:com_loading
Rectangle{ Rectangle{
color: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) color: FluTheme.itemHoverColor
FluProgressRing{ FluProgressRing{
anchors.centerIn: parent anchors.centerIn: parent
visible: control.status === Image.Loading visible: control.status === Image.Loading
@ -36,7 +36,7 @@ Image {
Component{ Component{
id:com_error id:com_error
Rectangle{ Rectangle{
color: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) color: FluTheme.itemHoverColor
FluFilledButton{ FluFilledButton{
text: control.errorButtonText text: control.errorButtonText
anchors.centerIn: parent anchors.centerIn: parent

View File

@ -170,7 +170,7 @@ FluObject {
switch(_super.type){ switch(_super.type){
case mcontrol.const_success: return Qt.rgba(108/255,203/255,95/255,1); case mcontrol.const_success: return Qt.rgba(108/255,203/255,95/255,1);
case mcontrol.const_warning: return Qt.rgba(252/255,225/255,0/255,1); case mcontrol.const_warning: return Qt.rgba(252/255,225/255,0/255,1);
case mcontrol.const_info: return FluTheme.primaryColor.lighter; case mcontrol.const_info: return FluTheme.primaryColor;
case mcontrol.const_error: return Qt.rgba(255/255,153/255,164/255,1); case mcontrol.const_error: return Qt.rgba(255/255,153/255,164/255,1);
} }
return "#FFFFFF" return "#FFFFFF"
@ -213,7 +213,7 @@ FluObject {
switch(_super.type){ switch(_super.type){
case mcontrol.const_success: return Qt.rgba(108/255,203/255,95/255,1); case mcontrol.const_success: return Qt.rgba(108/255,203/255,95/255,1);
case mcontrol.const_warning: return Qt.rgba(252/255,225/255,0/255,1); case mcontrol.const_warning: return Qt.rgba(252/255,225/255,0/255,1);
case mcontrol.const_info: return FluTheme.primaryColor.lighter; case mcontrol.const_info: return FluTheme.primaryColor;
case mcontrol.const_error: return Qt.rgba(255/255,153/255,164/255,1); case mcontrol.const_error: return Qt.rgba(255/255,153/255,164/255,1);
} }
return "#FFFFFF" return "#FFFFFF"

View File

@ -48,23 +48,14 @@ T.MenuBarItem {
implicitHeight: 30 implicitHeight: 30
radius: 3 radius: 3
color: { color: {
if(FluTheme.dark){
if(control.highlighted){ if(control.highlighted){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
} }
if(control.hovered){ if(control.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(control.highlighted){
return Qt.rgba(0,0,0,0.06)
}
if(control.hovered){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
} }

View File

@ -99,17 +99,10 @@ T.MenuItem {
anchors.margins: 3 anchors.margins: 3
radius: 4 radius: 4
color:{ color:{
if(FluTheme.dark){
if(control.highlighted){ if(control.highlighted){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
}
return Qt.rgba(0,0,0,0)
}else{
if(control.highlighted){
return Qt.rgba(0,0,0,0.06)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
} }

View File

@ -25,7 +25,7 @@ TextArea{
leftPadding: padding+4 leftPadding: padding+4
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectedTextColor: color selectedTextColor: color
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
placeholderTextColor: { placeholderTextColor: {
if(!enabled){ if(!enabled){
return placeholderDisableColor return placeholderDisableColor

View File

@ -240,7 +240,7 @@ Item {
width: 3 width: 3
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
visible: { visible: {
if(!model){ if(!model){
return false return false
@ -292,25 +292,15 @@ Item {
} }
color: { color: {
if(!item_control.enabled){ if(!item_control.enabled){
return Qt.rgba(0,0,0,0) return FluTheme.itemNormalColor
} }
if(FluTheme.dark){
if((nav_list.currentIndex === _idx)&&type===0){
return Qt.rgba(1,1,1,0.06)
}
if(item_control.hovered){
return Qt.rgba(1,1,1,0.03)
}
return Qt.rgba(0,0,0,0)
}else{
if(nav_list.currentIndex === _idx&&type===0){ if(nav_list.currentIndex === _idx&&type===0){
return Qt.rgba(0,0,0,0.06) return FluTheme.itemCheckColor
} }
if(item_control.hovered){ if(item_control.hovered){
return Qt.rgba(0,0,0,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
Component{ Component{
id:com_icon id:com_icon
@ -514,37 +504,21 @@ Item {
anchors.fill: parent anchors.fill: parent
color: { color: {
if(!item_control.enabled){ if(!item_control.enabled){
return Qt.rgba(0,0,0,0) return FluTheme.itemNormalColor
} }
if(FluTheme.dark){
if(type===0){ if(type===0){
if(nav_list.currentIndex === _idx){ if(nav_list.currentIndex === _idx){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
} }
}else{ }else{
if(nav_list.currentIndex === (nav_list.count-layout_footer.count+_idx)){ if(nav_list.currentIndex === (nav_list.count-layout_footer.count+_idx)){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
} }
} }
if(item_control.hovered){ if(item_control.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(type===0){
if(nav_list.currentIndex === _idx){
return Qt.rgba(0,0,0,0.06)
}
}else{
if(nav_list.currentIndex === (nav_list.count-layout_footer.count+_idx)){
return Qt.rgba(0,0,0,0.06)
}
}
if(item_control.hovered){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
Component{ Component{
id:com_icon id:com_icon
@ -954,9 +928,6 @@ Item {
} }
FluIconButton{ FluIconButton{
visible:d.isCompactAndNotPanel visible:d.isCompactAndNotPanel
hoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
pressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
normalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
width:38 width:38
height:34 height:34
x:6 x:6
@ -1005,7 +976,7 @@ Item {
Rectangle{ Rectangle{
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
width: 3 width: 3
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
@ -1063,7 +1034,7 @@ Item {
Rectangle{ Rectangle{
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
width: 3 width: 3
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
@ -1127,17 +1098,10 @@ Item {
focusPolicy:Qt.TabFocus focusPolicy:Qt.TabFocus
background: Rectangle{ background: Rectangle{
color: { color: {
if(FluTheme.dark){
if(item_button.hovered){ if(item_button.hovered){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(item_button.hovered){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
FluFocusRectangle{ FluFocusRectangle{
visible: item_button.activeFocus visible: item_button.activeFocus

View File

@ -26,7 +26,7 @@ TextField{
leftPadding: padding+4 leftPadding: padding+4
echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color selectedTextColor: color
placeholderTextColor: { placeholderTextColor: {
if(!enabled){ if(!enabled){

View File

@ -36,7 +36,7 @@ Page {
Rectangle{ Rectangle{
height: 3 height: 3
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
width: nav_list.currentItem ? nav_list.currentItem.width : 0 width: nav_list.currentItem ? nav_list.currentItem.width : 0
y:d.tabY y:d.tabY
Behavior on width { Behavior on width {

View File

@ -7,7 +7,7 @@ ProgressBar{
property int duration: 888 property int duration: 888
property real strokeWidth: 6 property real strokeWidth: 6
property bool progressVisible: false property bool progressVisible: false
property color color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color color: FluTheme.primaryColor
property color backgroundColor : FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1) property color backgroundColor : FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1)
id:control id:control
indeterminate : true indeterminate : true

View File

@ -13,7 +13,7 @@ Button {
} }
property color normalColor: { property color normalColor: {
if(d.checked){ if(d.checked){
return FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark return FluTheme.primaryColor
}else{ }else{
return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1) return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)
} }
@ -67,7 +67,7 @@ Button {
width: parent.width * control.progress width: parent.width * control.progress
height: control.progress === 1 ? background.height : 3 height: control.progress === 1 ? background.height : 3
visible: !d.checked visible: !d.checked
color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark color: FluTheme.primaryColor
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
Behavior on height{ Behavior on height{
enabled: control.progress === 1 enabled: control.progress === 1

View File

@ -7,7 +7,7 @@ ProgressBar{
property int duration: 888 property int duration: 888
property real strokeWidth: 6 property real strokeWidth: 6
property bool progressVisible: false property bool progressVisible: false
property color color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color color: FluTheme.primaryColor
property color backgroundColor : FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1) property color backgroundColor : FluTheme.dark ? Qt.rgba(99/255,99/255,99/255,1) : Qt.rgba(214/255,214/255,214/255,1)
id:control id:control
indeterminate : true indeterminate : true

View File

@ -7,7 +7,7 @@ import FluentUI
Button { Button {
property string contentDescription: "" property string contentDescription: ""
property bool disabled: false property bool disabled: false
property color borderNormalColor: checked ? FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark : FluTheme.dark ? Qt.rgba(161/255,161/255,161/255,1) : Qt.rgba(141/255,141/255,141/255,1) property color borderNormalColor: checked ? FluTheme.primaryColor : FluTheme.dark ? Qt.rgba(161/255,161/255,161/255,1) : Qt.rgba(141/255,141/255,141/255,1)
property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(198/255,198/255,198/255,1) property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(198/255,198/255,198/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1)
property color hoverColor: checked ? FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1) property color hoverColor: checked ? FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)

View File

@ -42,7 +42,7 @@ T.RangeSlider {
} }
return control.first.hovered ? 1.2 : 1 return control.first.hovered ? 1.2 : 1
} }
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark iconColor: FluTheme.primaryColor
anchors.centerIn: parent anchors.centerIn: parent
Behavior on scale{ Behavior on scale{
NumberAnimation{ NumberAnimation{
@ -73,7 +73,7 @@ T.RangeSlider {
} }
return control.second.hovered ? 1.2 : 1 return control.second.hovered ? 1.2 : 1
} }
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark iconColor: FluTheme.primaryColor
anchors.centerIn: parent anchors.centerIn: parent
Behavior on scale{ Behavior on scale{
NumberAnimation{ NumberAnimation{
@ -102,7 +102,7 @@ T.RangeSlider {
y: control.horizontal ? 0 : control.second.visualPosition * parent.height + 3 y: control.horizontal ? 0 : control.second.visualPosition * parent.height + 3
width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 6 : 6 width: control.horizontal ? control.second.position * parent.width - control.first.position * parent.width - 6 : 6
height: control.horizontal ? 6 : control.second.position * parent.height - control.first.position * parent.height - 6 height: control.horizontal ? 6 : control.second.position * parent.height - control.first.position * parent.height - 6
color:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
} }
FluTooltip{ FluTooltip{

View File

@ -32,7 +32,7 @@ Item {
} }
iconSize: control.size iconSize: control.size
iconSource: isSelected ? FluentIcons.FavoriteStarFill : FluentIcons.FavoriteStar iconSource: isSelected ? FluentIcons.FavoriteStarFill : FluentIcons.FavoriteStar
iconColor: isSelected ? FluTheme.primaryColor.dark : (FluTheme.dark ? "#FFFFFF" : "#000000") iconColor: isSelected ? FluTheme.primaryColor : (FluTheme.dark ? "#FFFFFF" : "#000000")
anchors.centerIn: parent anchors.centerIn: parent
} }
} }

View File

@ -11,7 +11,7 @@ Item{
property int dotSize: 5 property int dotSize: 5
property int borderSize: 1 property int borderSize: 1
property var saveFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0] property var saveFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
property color borderColor: FluTheme.primaryColor.dark property color borderColor: FluTheme.primaryColor
signal captrueCompleted(var captrue) signal captrueCompleted(var captrue)
QtObject{ QtObject{
id:d id:d
@ -508,7 +508,7 @@ Item{
} }
FluIconButton{ FluIconButton{
iconSource: FluentIcons.AcceptMedium iconSource: FluentIcons.AcceptMedium
iconColor: FluTheme.primaryColor.dark iconColor: FluTheme.primaryColor
onClicked: { onClicked: {
screenshot_background.capture(screenshot.start,screenshot.end) screenshot_background.capture(screenshot.start,screenshot.end)
} }

View File

@ -40,7 +40,7 @@ T.Slider {
} }
return control.hovered ? 1.2 : 1 return control.hovered ? 1.2 : 1
} }
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark iconColor: FluTheme.primaryColor
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
@ -63,7 +63,7 @@ T.Slider {
width: control.horizontal ? control.position * parent.width : 6 width: control.horizontal ? control.position * parent.width : 6
height: control.horizontal ? 6 : control.position * parent.height height: control.horizontal ? 6 : control.position * parent.height
radius: 3 radius: 3
color:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
} }
FluTooltip{ FluTooltip{

View File

@ -40,7 +40,7 @@ T.SpinBox {
} }
return normalColor return normalColor
} }
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color selectedTextColor: color
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
@ -53,10 +53,13 @@ T.SpinBox {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: contentItem.enabled visible: contentItem.enabled
color: { color: {
if(contentItem.activeFocus){
return FluTheme.primaryColor
}
if(FluTheme.dark){ if(FluTheme.dark){
contentItem.activeFocus ? FluTheme.primaryColor.lighter : Qt.rgba(166/255,166/255,166/255,1) return Qt.rgba(166/255,166/255,166/255,1)
}else{ }else{
return contentItem.activeFocus ? FluTheme.primaryColor.dark : Qt.rgba(183/255,183/255,183/255,1) return Qt.rgba(183/255,183/255,183/255,1)
} }
} }
Behavior on height{ Behavior on height{

View File

@ -189,23 +189,13 @@ Item {
anchors.fill: parent anchors.fill: parent
radius: [6,6,0,0] radius: [6,6,0,0]
color: { color: {
if(FluTheme.dark){
if(item_mouse_hove.containsMouse || item_btn_close.hovered){ if(item_mouse_hove.containsMouse || item_btn_close.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
} }
if(tab_nav.currentIndex === index){ if(tab_nav.currentIndex === index){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
}
return Qt.rgba(0,0,0,0)
}else{
if(item_mouse_hove.containsMouse || item_btn_close.hovered){
return Qt.rgba(0,0,0,0.03)
}
if(tab_nav.currentIndex === index){
return Qt.rgba(0,0,0,0.06)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
RowLayout{ RowLayout{

View File

@ -270,7 +270,7 @@ Rectangle {
Rectangle{ Rectangle{
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
width: 3 width: 3
visible: d.currentRow === table_model.getRow(row).__index && column === 0 visible: d.currentRow === table_model.getRow(row).__index && column === 0
anchors{ anchors{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import FluentUI import FluentUI
Text { Text {
property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220 property color textColor: FluTheme.fontPrimaryColor
id:text id:text
color: textColor color: textColor
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering

View File

@ -26,7 +26,7 @@ TextField{
} }
font:FluTextStyle.Body font:FluTextStyle.Body
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6) selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color selectedTextColor: color
placeholderTextColor: { placeholderTextColor: {
if(!enabled){ if(!enabled){

View File

@ -36,10 +36,13 @@ FluClip{
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: !inputItem.disabled visible: !inputItem.disabled
color: { color: {
if(inputItem.activeFocus){
return FluTheme.primaryColor
}
if(FluTheme.dark){ if(FluTheme.dark){
return inputItem.activeFocus ? FluTheme.primaryColor.lighter : Qt.rgba(166/255,166/255,166/255,1) return Qt.rgba(166/255,166/255,166/255,1)
}else{ }else{
return inputItem.activeFocus ? FluTheme.primaryColor.dark : Qt.rgba(134/255,134/255,134/255,1) return Qt.rgba(134/255,134/255,134/255,1)
} }
} }
Behavior on height{ Behavior on height{

View File

@ -6,14 +6,14 @@ import FluentUI
Button { Button {
property bool disabled: false property bool disabled: false
property string contentDescription: "" property string contentDescription: ""
property color normalColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color normalColor: FluTheme.primaryColor
property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.15) : Qt.lighter(normalColor,1.15) property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.15) : Qt.lighter(normalColor,1.15)
property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.3) : Qt.lighter(normalColor,1.3) property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.3) : Qt.lighter(normalColor,1.3)
property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1) property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
property color backgroundHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03) property color backgroundHoverColor: FluTheme.itemHoverColor
property color backgroundPressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06) property color backgroundPressedColor: FluTheme.itemPressColor
property color backgroundNormalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0) property color backgroundNormalColor: FluTheme.itemNormalColor
property color backgroundDisableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0) property color backgroundDisableColor: FluTheme.itemNormalColor
property bool textBold: true property bool textBold: true
property color textColor: { property color textColor: {
if(!enabled){ if(!enabled){

View File

@ -184,11 +184,7 @@ Rectangle {
anchors.rightMargin: 5 anchors.rightMargin: 5
color: { color: {
if(getListView().currentIndex === position){ if(getListView().currentIndex === position){
if(FluTheme.dark){ return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor.lighter,1.1) : FluTheme.primaryColor.lighter
}else{
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor.dark,1.1): FluTheme.primaryColor.dark
}
} }
if(item_mouse.containsMouse){ if(item_mouse.containsMouse){
return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1) return FluTheme.dark ? Qt.rgba(63/255,60/255,61/255,1) : Qt.rgba(237/255,237/255,242/255,1)

View File

@ -82,7 +82,7 @@ Item{
radius: 8 radius: 8
border.width: 4 border.width: 4
color:FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1) color:FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
border.color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark border.color: FluTheme.primaryColor
} }
} }
@ -92,7 +92,7 @@ Item{
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
text: modelData.lable text: modelData.lable
color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark color: FluTheme.primaryColor
} }
} }

View File

@ -8,7 +8,7 @@ Button {
property string contentDescription: "" property string contentDescription: ""
property color normalColor: { property color normalColor: {
if(checked){ if(checked){
return FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark return FluTheme.primaryColor
}else{ }else{
return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1) return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)
} }

View File

@ -8,11 +8,11 @@ Button {
property bool disabled: false property bool disabled: false
property string contentDescription: "" property string contentDescription: ""
property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(233/255,233/255,233/255,1) property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(233/255,233/255,233/255,1)
property color checkColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color checkColor: FluTheme.primaryColor
property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(240/255,240/255,240/255,1) property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(240/255,240/255,240/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1) property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1)
property color borderNormalColor: FluTheme.dark ? Qt.rgba(161/255,161/255,161/255,1) : Qt.rgba(141/255,141/255,141/255,1) property color borderNormalColor: FluTheme.dark ? Qt.rgba(161/255,161/255,161/255,1) : Qt.rgba(141/255,141/255,141/255,1)
property color borderCheckColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color borderCheckColor: FluTheme.primaryColor
property color borderDisableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(200/255,200/255,200/255,1) property color borderDisableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(200/255,200/255,200/255,1)
property color dotNormalColor: FluTheme.dark ? Qt.rgba(208/255,208/255,208/255,1) : Qt.rgba(93/255,93/255,93/255,1) property color dotNormalColor: FluTheme.dark ? Qt.rgba(208/255,208/255,208/255,1) : Qt.rgba(93/255,93/255,93/255,1)
property color dotCheckColor: FluTheme.dark ? Qt.rgba(0/255,0/255,0/255,1) : Qt.rgba(255/255,255/255,255/255,1) property color dotCheckColor: FluTheme.dark ? Qt.rgba(0/255,0/255,0/255,1) : Qt.rgba(255/255,255/255,255/255,1)

View File

@ -22,7 +22,7 @@ Item {
property int dropIndex: -1 property int dropIndex: -1
property bool isDropTopArea: false property bool isDropTopArea: false
property int dragIndex: -1 property int dragIndex: -1
property color hitColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color hitColor: FluTheme.primaryColor
} }
onDataSourceChanged: { onDataSourceChanged: {
tree_model.setDataSource(dataSource) tree_model.setDataSource(dataSource)
@ -138,7 +138,7 @@ Item {
width: 3 width: 3
height: 18 height: 18
radius: 1.5 radius: 1.5
color: FluTheme.primaryColor.dark color: FluTheme.primaryColor
visible: isCurrent visible: isCurrent
anchors{ anchors{
left: parent.left left: parent.left
@ -322,29 +322,16 @@ Item {
border.color: d.hitColor border.color: d.hitColor
border.width: d.dragIndex === rowIndex ? 1 : 0 border.width: d.dragIndex === rowIndex ? 1 : 0
color: { color: {
if(FluTheme.dark){
if(isCurrent){ if(isCurrent){
return Qt.rgba(1,1,1,0.06) return FluTheme.itemCheckColor
} }
if(item_mouse.containsMouse || item_check_box.hovered){ if(item_mouse.containsMouse || item_check_box.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
} }
if(item_loader_expand.item && item_loader_expand.item.hovered){ if(item_loader_expand.item && item_loader_expand.item.hovered){
return Qt.rgba(1,1,1,0.03) return FluTheme.itemHoverColor
}
return Qt.rgba(0,0,0,0)
}else{
if(isCurrent){
return Qt.rgba(0,0,0,0.06)
}
if(item_mouse.containsMouse || item_check_box.hovered){
return Qt.rgba(0,0,0,0.03)
}
if(item_loader_expand.item && item_loader_expand.item.hovered){
return Qt.rgba(0,0,0,0.03)
}
return Qt.rgba(0,0,0,0)
} }
return FluTheme.itemNormalColor
} }
} }
RowLayout{ RowLayout{

View File

@ -15,9 +15,9 @@ Window {
property var appBar: com_app_bar property var appBar: com_app_bar
property color backgroundColor: { property color backgroundColor: {
if(active){ if(active){
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1) return FluTheme.windowActiveBackgroundColor
} }
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(237/255,237/255,237/255,1) return FluTheme.windowBackgroundColor
} }
property bool stayTop: false property bool stayTop: false
property var _pageRegister property var _pageRegister