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{
anchors.fill: parent
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
}
Rectangle{
@ -172,17 +172,10 @@ FluScrollablePage{
anchors.fill: parent
radius: 8
color:{
if(FluTheme.dark){
if(item_mouse.containsMouse){
return Qt.rgba(1,1,1,0.03)
}
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)
if(item_mouse.containsMouse){
return FluTheme.itemHoverColor
}
return FluTheme.itemNormalColor
}
}
Image{
@ -227,7 +220,7 @@ FluScrollablePage{
height: 12
width: 12
radius: 6
color: FluTheme.primaryColor.dark
color: FluTheme.primaryColor
anchors{
right: parent.right
top: parent.top

View File

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

View File

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

View File

@ -181,7 +181,7 @@ FluContentPage{
iconSource: FluentIcons.ChevronUp
iconColor: {
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)
}
@ -202,7 +202,7 @@ FluContentPage{
iconSource: FluentIcons.ChevronDown
iconColor: {
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)
}

View File

@ -32,7 +32,7 @@ FluScrollablePage{
anchors.centerIn: parent
iconSource: FluentIcons.AcceptMedium
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)
}
MouseArea{
@ -40,7 +40,7 @@ FluScrollablePage{
anchors.fill: parent
hoverEnabled: true
onClicked: {
FluTheme.primaryColor = modelData
FluTheme.themeColor = modelData
}
}
}
@ -88,7 +88,7 @@ FluScrollablePage{
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTheme.primaryColor = FluColors.Orange
code:'FluTheme.themeColor = FluColors.Orange
FluTheme.dark = true

View File

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

View File

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

View File

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

View File

@ -182,7 +182,7 @@ FluContentPage{
iconSource: FluentIcons.ChevronUp
iconColor: {
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)
}
@ -203,7 +203,7 @@ FluContentPage{
iconSource: FluentIcons.ChevronDown
iconColor: {
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)
}

View File

@ -33,7 +33,7 @@ FluScrollablePage{
anchors.centerIn: parent
iconSource: FluentIcons.AcceptMedium
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)
}
MouseArea{
@ -41,7 +41,7 @@ FluScrollablePage{
anchors.fill: parent
hoverEnabled: true
onClicked: {
FluTheme.primaryColor = modelData
FluTheme.themeColor = modelData
}
}
}
@ -89,7 +89,7 @@ FluScrollablePage{
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTheme.primaryColor = FluColors.Orange
code:'FluTheme.themeColor = FluColors.Orange
FluTheme.dark = true

View File

@ -16,14 +16,31 @@ FluTheme::FluTheme(QObject *parent):QObject{parent}{
connect(this,&FluTheme::darkModeChanged,this,[=]{
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);
enableAnimation(true);
darkMode(FluThemeType::DarkMode::Light);
_systemDark = systemDark();
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){
Q_UNUSED(obj);
if (event->type() == QEvent::ApplicationPaletteChange || event->type() == QEvent::ThemeChange)

View File

@ -5,6 +5,7 @@
#include <QtQml/qqml.h>
#include <QJsonArray>
#include <QJsonObject>
#include <QColor>
#include "FluColorSet.h"
#include "stdafx.h"
#include "singleton.h"
@ -16,7 +17,18 @@ class FluTheme : public QObject
{
Q_OBJECT
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(bool,nativeText);
Q_PROPERTY_AUTO(bool,enableAnimation);
@ -26,6 +38,7 @@ private:
explicit FluTheme(QObject *parent = nullptr);
bool eventFilter(QObject *obj, QEvent *event);
bool systemDark();
void refreshColors();
public:
SINGLETONG(FluTheme)
Q_INVOKABLE QJsonArray awesomeList(const QString& keyword = "");
@ -33,7 +46,6 @@ public:
static FluTheme *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine){return getInstance();}
bool dark();
private:
bool _dark;
bool _systemDark;
};

View File

@ -14,12 +14,12 @@ Rectangle{
property string stayTopText : "置顶"
property string stayTopCancelText : "取消置顶"
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
property color minimizeNormalColor: Qt.rgba(0,0,0,0)
property color minimizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
property color minimizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
property color maximizeNormalColor: Qt.rgba(0,0,0,0)
property color maximizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
property color maximizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
property color minimizeNormalColor: FluTheme.itemNormalColor
property color minimizeHoverColor: FluTheme.itemHoverColor
property color minimizePressColor: FluTheme.itemPressColor
property color maximizeNormalColor: FluTheme.itemNormalColor
property color maximizeHoverColor: FluTheme.itemHoverColor
property color maximizePressColor: FluTheme.itemPressColor
property color closeNormalColor: Qt.rgba(0,0,0,0)
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)
@ -32,7 +32,7 @@ Rectangle{
property url icon
property int iconSize: 20
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(){
if (d.win.visibility === Window.Maximized)
d.win.visibility = Window.Windowed
@ -135,7 +135,7 @@ Rectangle{
}
text:d.stayTop ? control.stayTopCancelText : control.stayTopText
radius: 0
iconColor: d.stayTop ? (FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark) : control.textColor
iconColor: d.stayTop ? FluTheme.primaryColor : control.textColor
onClicked: stayTopClickListener()
}
FluIconButton{

View File

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

View File

@ -124,9 +124,9 @@ Item {
radius: 4
}
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.color: FluTheme.primaryColor.dark
border.color: FluTheme.primaryColor
MouseArea{
id:mouse_item
hoverEnabled: true

View File

@ -7,12 +7,12 @@ Button {
property bool disabled: false
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 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 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 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 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)

View File

@ -19,7 +19,7 @@ Button{
color:"#00000000"
border.color: {
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)
}
border.width: 1

View File

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

View File

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

View File

@ -169,11 +169,7 @@ Rectangle {
anchors.rightMargin: 5
color: {
if(getListView().currentIndex === position){
if(FluTheme.dark){
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
}
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor
}
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)

View File

@ -5,7 +5,7 @@ import FluentUI 1.0
Button {
property bool disabled: false
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 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)

View File

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

View File

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

View File

@ -170,7 +170,7 @@ FluObject {
switch(_super.type){
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_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);
}
return "#FFFFFF"
@ -213,7 +213,7 @@ FluObject {
switch(_super.type){
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_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);
}
return "#FFFFFF"

View File

@ -47,23 +47,13 @@ T.MenuBarItem {
implicitHeight: 30
radius: 3
color: {
if(FluTheme.dark){
if(control.highlighted){
return Qt.rgba(1,1,1,0.06)
}
if(control.hovered){
return Qt.rgba(1,1,1,0.03)
}
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)
if(control.highlighted){
return FluTheme.itemCheckColor
}
if(control.hovered){
return FluTheme.itemHoverColor
}
return FluTheme.itemNormalColor
}
}
}

View File

@ -98,17 +98,10 @@ T.MenuItem {
anchors.margins: 3
radius: 4
color:{
if(FluTheme.dark){
if(control.highlighted){
return Qt.rgba(1,1,1,0.06)
}
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)
if(control.highlighted){
return FluTheme.itemCheckColor
}
return FluTheme.itemNormalColor
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,7 @@ import FluentUI 1.0
ProgressBar{
property real strokeWidth: 6
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)
id:control
indeterminate : true

View File

@ -12,7 +12,7 @@ Button {
}
property color normalColor: {
if(d.checked){
return FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
return FluTheme.primaryColor
}else{
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
height: control.progress === 1 ? background.height : 3
visible: !d.checked
color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
color: FluTheme.primaryColor
anchors.bottom: parent.bottom
Behavior on height{
enabled: control.progress !== 1

View File

@ -6,7 +6,7 @@ import FluentUI 1.0
ProgressBar{
property real strokeWidth: 6
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)
id:control
indeterminate : true

View File

@ -6,7 +6,7 @@ import FluentUI 1.0
Button {
property string contentDescription: ""
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 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)

View File

@ -41,7 +41,7 @@ T.RangeSlider {
}
return control.first.hovered ? 1.2 : 1
}
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
iconColor: FluTheme.primaryColor
anchors.centerIn: parent
Behavior on scale{
NumberAnimation{
@ -72,7 +72,7 @@ T.RangeSlider {
}
return control.second.hovered ? 1.2 : 1
}
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
iconColor: FluTheme.primaryColor
anchors.centerIn: parent
Behavior on scale{
NumberAnimation{
@ -101,7 +101,7 @@ T.RangeSlider {
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
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{

View File

@ -32,7 +32,7 @@ Item {
}
iconSize: control.size
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
}
}

View File

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

View File

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

View File

@ -39,7 +39,7 @@ T.SpinBox {
}
return normalColor
}
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor.lightest,0.6)
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
@ -52,10 +52,13 @@ T.SpinBox {
anchors.bottom: parent.bottom
visible: contentItem.enabled
color: {
if(contentItem.activeFocus){
return FluTheme.primaryColor
}
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{
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{

View File

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

View File

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

View File

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

View File

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

View File

@ -36,10 +36,13 @@ FluClip{
anchors.bottom: parent.bottom
visible: !inputItem.disabled
color: {
if(inputItem.activeFocus){
return FluTheme.primaryColor
}
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{
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{

View File

@ -5,14 +5,14 @@ import FluentUI 1.0
Button {
property bool disabled: false
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 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 backgroundHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
property color backgroundPressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
property color backgroundNormalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
property color backgroundDisableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
property color backgroundHoverColor: FluTheme.itemHoverColor
property color backgroundPressedColor: FluTheme.itemPressColor
property color backgroundNormalColor: FluTheme.itemNormalColor
property color backgroundDisableColor: FluTheme.itemNormalColor
property bool textBold: true
property color textColor: {
if(!enabled){

View File

@ -184,11 +184,7 @@ Rectangle {
anchors.rightMargin: 5
color: {
if(getListView().currentIndex === position){
if(FluTheme.dark){
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
}
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor
}
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)

View File

@ -82,7 +82,7 @@ Item{
radius: 8
border.width: 4
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
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
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 color normalColor: {
if(checked){
return FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
return FluTheme.primaryColor
}else{
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 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 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 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 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 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)

View File

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

View File

@ -16,9 +16,9 @@ Window {
property var appBar: com_app_bar
property color backgroundColor: {
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 var _pageRegister

View File

@ -14,12 +14,12 @@ Rectangle{
property string stayTopText : "置顶"
property string stayTopCancelText : "取消置顶"
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
property color minimizeNormalColor: Qt.rgba(0,0,0,0)
property color minimizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
property color minimizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
property color maximizeNormalColor: Qt.rgba(0,0,0,0)
property color maximizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
property color maximizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
property color minimizeNormalColor: FluTheme.itemNormalColor
property color minimizeHoverColor: FluTheme.itemHoverColor
property color minimizePressColor: FluTheme.itemPressColor
property color maximizeNormalColor: FluTheme.itemNormalColor
property color maximizeHoverColor: FluTheme.itemHoverColor
property color maximizePressColor: FluTheme.itemPressColor
property color closeNormalColor: Qt.rgba(0,0,0,0)
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)
@ -32,7 +32,7 @@ Rectangle{
property url icon
property int iconSize: 20
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(){
if (d.win.visibility === Window.Maximized)
d.win.visibility = Window.Windowed
@ -135,7 +135,7 @@ Rectangle{
}
text:d.stayTop ? control.stayTopCancelText : control.stayTopText
radius: 0
iconColor: d.stayTop ? (FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark) : control.textColor
iconColor: d.stayTop ? FluTheme.primaryColor : control.textColor
onClicked: stayTopClickListener()
}
FluIconButton{

View File

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

View File

@ -124,9 +124,9 @@ Item {
radius: 4
}
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.color: FluTheme.primaryColor.dark
border.color: FluTheme.primaryColor
MouseArea{
id:mouse_item
hoverEnabled: true

View File

@ -1,6 +1,5 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts
import FluentUI
@ -8,12 +7,12 @@ Button {
property bool disabled: false
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 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 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 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 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)
@ -31,6 +30,11 @@ Button {
id:control
enabled: !disabled
onClicked: clickListener()
onCheckableChanged: {
if(checkable){
checkable = false
}
}
background: Item{
FluFocusRectangle{
radius: 4

View File

@ -1,6 +1,5 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts
import QtQuick.Window
import FluentUI
@ -20,7 +19,7 @@ Button{
color:"#00000000"
border.color: {
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)
}
border.width: 1
@ -31,6 +30,7 @@ Button{
radius: 5
color: control.colorValue
}
}
Item{
id: d

View File

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

View File

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

View File

@ -169,11 +169,7 @@ Rectangle {
anchors.rightMargin: 5
color: {
if(getListView().currentIndex === position){
if(FluTheme.dark){
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
}
return item_mouse.containsMouse ? Qt.lighter(FluTheme.primaryColor,1.1): FluTheme.primaryColor
}
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)

View File

@ -6,7 +6,7 @@ import FluentUI
Button {
property bool disabled: false
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 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)

View File

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

View File

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

View File

@ -170,7 +170,7 @@ FluObject {
switch(_super.type){
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_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);
}
return "#FFFFFF"
@ -213,7 +213,7 @@ FluObject {
switch(_super.type){
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_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);
}
return "#FFFFFF"

View File

@ -48,23 +48,14 @@ T.MenuBarItem {
implicitHeight: 30
radius: 3
color: {
if(FluTheme.dark){
if(control.highlighted){
return Qt.rgba(1,1,1,0.06)
}
if(control.hovered){
return Qt.rgba(1,1,1,0.03)
}
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)
if(control.highlighted){
return FluTheme.itemCheckColor
}
if(control.hovered){
return FluTheme.itemHoverColor
}
return FluTheme.itemNormalColor
}
}
}

View File

@ -99,17 +99,10 @@ T.MenuItem {
anchors.margins: 3
radius: 4
color:{
if(FluTheme.dark){
if(control.highlighted){
return Qt.rgba(1,1,1,0.06)
}
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)
if(control.highlighted){
return FluTheme.itemCheckColor
}
return FluTheme.itemNormalColor
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ ProgressBar{
property int duration: 888
property real strokeWidth: 6
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)
id:control
indeterminate : true

View File

@ -13,7 +13,7 @@ Button {
}
property color normalColor: {
if(d.checked){
return FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
return FluTheme.primaryColor
}else{
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
height: control.progress === 1 ? background.height : 3
visible: !d.checked
color: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
color: FluTheme.primaryColor
anchors.bottom: parent.bottom
Behavior on height{
enabled: control.progress === 1

View File

@ -7,7 +7,7 @@ ProgressBar{
property int duration: 888
property real strokeWidth: 6
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)
id:control
indeterminate : true

View File

@ -7,7 +7,7 @@ import FluentUI
Button {
property string contentDescription: ""
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 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)

View File

@ -42,7 +42,7 @@ T.RangeSlider {
}
return control.first.hovered ? 1.2 : 1
}
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
iconColor: FluTheme.primaryColor
anchors.centerIn: parent
Behavior on scale{
NumberAnimation{
@ -73,7 +73,7 @@ T.RangeSlider {
}
return control.second.hovered ? 1.2 : 1
}
iconColor:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
iconColor: FluTheme.primaryColor
anchors.centerIn: parent
Behavior on scale{
NumberAnimation{
@ -102,7 +102,7 @@ T.RangeSlider {
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
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{

View File

@ -32,7 +32,7 @@ Item {
}
iconSize: control.size
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
}
}

View File

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

View File

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

View File

@ -40,7 +40,7 @@ T.SpinBox {
}
return normalColor
}
selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.25)
selectedTextColor: color
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
@ -53,10 +53,13 @@ T.SpinBox {
anchors.bottom: parent.bottom
visible: contentItem.enabled
color: {
if(contentItem.activeFocus){
return FluTheme.primaryColor
}
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{
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{

View File

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

View File

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

View File

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

View File

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

View File

@ -36,10 +36,13 @@ FluClip{
anchors.bottom: parent.bottom
visible: !inputItem.disabled
color: {
if(inputItem.activeFocus){
return FluTheme.primaryColor
}
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{
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{

View File

@ -6,14 +6,14 @@ import FluentUI
Button {
property bool disabled: false
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 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 backgroundHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
property color backgroundPressedColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
property color backgroundNormalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
property color backgroundDisableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
property color backgroundHoverColor: FluTheme.itemHoverColor
property color backgroundPressedColor: FluTheme.itemPressColor
property color backgroundNormalColor: FluTheme.itemNormalColor
property color backgroundDisableColor: FluTheme.itemNormalColor
property bool textBold: true
property color textColor: {
if(!enabled){

View File

@ -184,11 +184,7 @@ Rectangle {
anchors.rightMargin: 5
color: {
if(getListView().currentIndex === position){
if(FluTheme.dark){
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
}
return item_mouse.containsMouse ? Qt.darker(FluTheme.primaryColor,1.1) : FluTheme.primaryColor
}
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)

View File

@ -82,7 +82,7 @@ Item{
radius: 8
border.width: 4
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
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
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 color normalColor: {
if(checked){
return FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
return FluTheme.primaryColor
}else{
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 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 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 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 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 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)

View File

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

View File

@ -15,9 +15,9 @@ Window {
property var appBar: com_app_bar
property color backgroundColor: {
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 var _pageRegister