main
朱子楚\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; return 0;
} }
if(ipc.isAttached()){ if(ipc.isAttached()){
ipc.registerEventHandler(activeWindowEvent,[&appInfo](const QByteArray& data){ ipc.registerEventHandler(activeWindowEvent,[&appInfo](const QByteArray&){
Q_EMIT appInfo->activeWindow(); Q_EMIT appInfo->activeWindow();
return true; return true;
}); });

View File

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

View File

@ -1,9 +1,10 @@
import QtQuick import QtQuick
import QtQuick.Window
import FluentUI import FluentUI
Rectangle { 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{ Behavior on color{
ColorAnimation { ColorAnimation {

View File

@ -1,5 +1,6 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Window
import FluentUI import FluentUI
Item { Item {
@ -20,8 +21,20 @@ Item {
width: parent.width width: parent.width
height: 45 height: 45
radius: 4 radius: 4
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/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 ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/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{ MouseArea{
id:root_mouse 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) 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){ 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) 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{ background: Rectangle{
color: { color: {
if(active){ 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) return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
} }