RibbonTitleBar,RibbonWindow: Add window active animation for window's btns in macOS.
This commit is contained in:
parent
1cd113316c
commit
e43b1eaf04
|
@ -112,11 +112,11 @@ Item {
|
|||
top: parent.top
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
leftMargin: Qt.platform.os === "osx" && Window.window.visibility === Window.Windowed ? 65 : 10
|
||||
leftMargin: Qt.platform.os === "osx" && Window.window.visibility === Window.Windowed && Window.active ? 65 : 10
|
||||
}
|
||||
Behavior on anchors.leftMargin {
|
||||
NumberAnimation{
|
||||
duration: 100
|
||||
duration: 50
|
||||
easing.type: Easing.OutSine
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,12 @@ Window {
|
|||
}
|
||||
return '#FFFFFF'
|
||||
}
|
||||
|
||||
onActiveChanged: {
|
||||
if(Qt.platform.os === "osx")
|
||||
PlatformSupport.showSystemTitleBtns(window,active)
|
||||
}
|
||||
|
||||
onBlurBehindWindowChanged: {
|
||||
if (Qt.platform.os === 'windows')
|
||||
windowAgent.setWindowAttribute("dwm-blur", blurBehindWindow)
|
||||
|
|
|
@ -112,11 +112,11 @@ Item {
|
|||
top: parent.top
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
leftMargin: Qt.platform.os === "osx" && Window.window.visibility === Window.Windowed ? 65 : 10
|
||||
leftMargin: Qt.platform.os === "osx" && Window.window.visibility === Window.Windowed && Window.active ? 65 : 10
|
||||
}
|
||||
Behavior on anchors.leftMargin {
|
||||
NumberAnimation{
|
||||
duration: 100
|
||||
duration: 50
|
||||
easing.type: Easing.OutSine
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,12 @@ Window {
|
|||
}
|
||||
return '#FFFFFF'
|
||||
}
|
||||
|
||||
onActiveChanged: {
|
||||
if(Qt.platform.os === "osx")
|
||||
PlatformSupport.showSystemTitleBtns(window,active)
|
||||
}
|
||||
|
||||
onBlurBehindWindowChanged: {
|
||||
if (Qt.platform.os === 'windows')
|
||||
windowAgent.setWindowAttribute("dwm-blur", blurBehindWindow)
|
||||
|
|
Loading…
Reference in New Issue