main
朱子楚\zhuzi 2023-05-18 23:24:53 +08:00
parent 9adc63b3bc
commit 8480267127
3 changed files with 17 additions and 12 deletions

View File

@ -18,7 +18,7 @@ void postInit(){
qDebug()<<"postInit";
FramelessHelper::Core::setApplicationOSThemeAware();
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
// FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial);
FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial);
}
void initEngine(QQmlApplicationEngine* engine){
qDebug()<<"initEngine";

View File

@ -23,17 +23,7 @@ Rectangle{
property bool isMac: FluTools.isMacos()
property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
id:root
color: {
if(active){
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)
}
Behavior on color{
ColorAnimation {
duration: 300
}
}
color: Qt.rgba(0,0,0,0)
height: visible ? 30 : 0
opacity: visible
z: 65535
@ -63,6 +53,18 @@ Rectangle{
visible: root.titleVisible
color:root.textColor
}
//
Rectangle{
width: 120
height: root.height
anchors.right: parent.right
color:{
if(active){
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)
}
}
RowLayout{
anchors.right: parent.right
height: root.height

View File

@ -81,6 +81,9 @@ Window {
id:framless_helper
onReady: {
setTitleBarItem(title_bar)
title_bar.maximizeButton.visible = false
title_bar.minimizeButton.visible = false
title_bar.closeButton.visible = false
framless_helper.moveWindowToDesktopCenter()
setHitTestVisible(title_bar.minimizeButton())
setHitTestVisible(title_bar.maximizeButton())