update
parent
9adc63b3bc
commit
8480267127
|
@ -18,7 +18,7 @@ void postInit(){
|
||||||
qDebug()<<"postInit";
|
qDebug()<<"postInit";
|
||||||
FramelessHelper::Core::setApplicationOSThemeAware();
|
FramelessHelper::Core::setApplicationOSThemeAware();
|
||||||
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
|
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
|
||||||
// FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial);
|
FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial);
|
||||||
}
|
}
|
||||||
void initEngine(QQmlApplicationEngine* engine){
|
void initEngine(QQmlApplicationEngine* engine){
|
||||||
qDebug()<<"initEngine";
|
qDebug()<<"initEngine";
|
||||||
|
|
|
@ -23,17 +23,7 @@ Rectangle{
|
||||||
property bool isMac: FluTools.isMacos()
|
property bool isMac: FluTools.isMacos()
|
||||||
property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||||
id:root
|
id:root
|
||||||
color: {
|
color: Qt.rgba(0,0,0,0)
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
height: visible ? 30 : 0
|
height: visible ? 30 : 0
|
||||||
opacity: visible
|
opacity: visible
|
||||||
z: 65535
|
z: 65535
|
||||||
|
@ -63,6 +53,18 @@ Rectangle{
|
||||||
visible: root.titleVisible
|
visible: root.titleVisible
|
||||||
color:root.textColor
|
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{
|
RowLayout{
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: root.height
|
height: root.height
|
||||||
|
|
|
@ -81,6 +81,9 @@ Window {
|
||||||
id:framless_helper
|
id:framless_helper
|
||||||
onReady: {
|
onReady: {
|
||||||
setTitleBarItem(title_bar)
|
setTitleBarItem(title_bar)
|
||||||
|
title_bar.maximizeButton.visible = false
|
||||||
|
title_bar.minimizeButton.visible = false
|
||||||
|
title_bar.closeButton.visible = false
|
||||||
framless_helper.moveWindowToDesktopCenter()
|
framless_helper.moveWindowToDesktopCenter()
|
||||||
setHitTestVisible(title_bar.minimizeButton())
|
setHitTestVisible(title_bar.minimizeButton())
|
||||||
setHitTestVisible(title_bar.maximizeButton())
|
setHitTestVisible(title_bar.maximizeButton())
|
||||||
|
|
Loading…
Reference in New Issue