This commit is contained in:
朱子楚\zhuzi 2023-04-23 18:08:20 +08:00
parent 82d1edc43c
commit 94c0356c25
6 changed files with 35 additions and 8 deletions

View File

@ -34,7 +34,7 @@ int main(int argc, char *argv[])
return 0;
}
if(ipc.isAttached()){
ipc.registerEventHandler(activeWindowEvent,[&appInfo](const QByteArray& data){
ipc.registerEventHandler(activeWindowEvent,[&appInfo](const QByteArray&){
Q_EMIT appInfo->activeWindow();
return true;
});

View File

@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Window
import FluentUI
Rectangle {
@ -12,12 +13,24 @@ Rectangle {
property int bottomPadding : 0
radius: 4
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
border.width: 1
implicitHeight: height
implicitWidth: width
Behavior on color{
ColorAnimation {
duration: 300
}
}
Behavior on border.color{
ColorAnimation {
duration: 300
}
}
Item {
id: container
anchors.fill: parent

View File

@ -1,9 +1,10 @@
import QtQuick
import QtQuick.Window
import FluentUI
Rectangle {
color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,230/255,234/255,1)
color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,230/255,234/255,1)
Behavior on color{
ColorAnimation {

View File

@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Window
import FluentUI
Item {
@ -20,8 +21,20 @@ Item {
width: parent.width
height: 45
radius: 4
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1) : Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
Behavior on color{
ColorAnimation {
duration: 300
}
}
Behavior on border.color{
ColorAnimation {
duration: 300
}
}
MouseArea{
id:root_mouse

View File

@ -621,7 +621,7 @@ Item {
return FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(243/255,243/255,243/255,1)
}
if(window && window.active){
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(238/255,244/255,249/255,1)
return FluTheme.dark ? Qt.rgba(26/255,34/255,41/255,1) : Qt.rgba(238/255,244/255,249/255,1)
}
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
}

View File

@ -32,7 +32,7 @@ ApplicationWindow {
background: Rectangle{
color: {
if(active){
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(238/255,244/255,249/255,1)
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(238/255,244/255,249/255,1)
}
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
}