This commit is contained in:
朱子楚\zhuzi 2023-03-09 23:53:36 +08:00
parent 0867043d7a
commit d835b7c23d
2 changed files with 19 additions and 17 deletions

View File

@ -153,13 +153,13 @@ FluWindow {
} }
return "#202020" return "#202020"
}else{ }else{
if(nav_list.currentIndex === index){
return "#EAEAEA"
}
if(item_mouse.containsMouse){ if(item_mouse.containsMouse){
return "#EDEDED" return Qt.rgba(0,0,0,0.03)
} }
return "#F3f3f3" if(nav_list.currentIndex === index){
return Qt.rgba(0,0,0,0.06)
}
return Qt.rgba(0,0,0,0)
} }
} }

View File

@ -14,7 +14,13 @@ Item {
return Window.window return Window.window
} }
property color color: FluTheme.isDark ? "#202020" : "#F3F3F3" property color color: {
if(window && window.active){
return FluTheme.isDark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(238/255,244/255,249/255,1)
}
return FluTheme.isDark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
}
property string title: "FluentUI" property string title: "FluentUI"
property int minimumWidth property int minimumWidth
property int maximumWidth property int maximumWidth
@ -25,12 +31,7 @@ Item {
if(!FluTheme.isFrameless){ if(!FluTheme.isFrameless){
return 0 return 0
} }
if(window === null) return (window && (window.visibility === Window.Maximized)) ? 0 : 4
return 4
if(Window.window.visibility === Window.Maximized){
return 0
}
return 4
} }
default property alias content: container.data default property alias content: container.data
@ -47,11 +48,7 @@ Item {
Rectangle{ Rectangle{
property color borerlessColor : FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color borerlessColor : FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
color: { color: (window && window.active) ? borerlessColor : Qt.lighter(borerlessColor,1.1)
if(window === null)
return borerlessColor
return window.active ? borerlessColor : Qt.lighter(borerlessColor,1.1)
}
border.width: 1 border.width: 1
anchors.fill: parent anchors.fill: parent
radius: 4 radius: 4
@ -63,6 +60,11 @@ Item {
color:root.color color:root.color
anchors.fill: parent anchors.fill: parent
anchors.margins: borderless anchors.margins: borderless
Behavior on color{
ColorAnimation {
duration: 300
}
}
} }
Component.onCompleted: { Component.onCompleted: {