mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
blur: fix dankbar auto-hide blur, fix synchronization in popouts and
modals
This commit is contained in:
@@ -235,8 +235,8 @@ Item {
|
||||
readonly property real s: Math.min(1, modalContainer.scaleValue)
|
||||
blurX: modalContainer.x + modalContainer.width * (1 - s) * 0.5 + Theme.snap(modalContainer.animX, root.dpr)
|
||||
blurY: modalContainer.y + modalContainer.height * (1 - s) * 0.5 + Theme.snap(modalContainer.animY, root.dpr)
|
||||
blurWidth: shouldBeVisible ? modalContainer.width * s : 0
|
||||
blurHeight: shouldBeVisible ? modalContainer.height * s : 0
|
||||
blurWidth: (shouldBeVisible && animatedContent.opacity > 0) ? modalContainer.width * s : 0
|
||||
blurHeight: (shouldBeVisible && animatedContent.opacity > 0) ? modalContainer.height * s : 0
|
||||
blurRadius: root.cornerRadius
|
||||
}
|
||||
|
||||
|
||||
@@ -314,8 +314,8 @@ Item {
|
||||
readonly property real s: Math.min(1, modalContainer.scale)
|
||||
blurX: root.modalX + root.modalWidth * (1 - s) * 0.5
|
||||
blurY: root.modalY + root.modalHeight * (1 - s) * 0.5
|
||||
blurWidth: contentVisible ? root.modalWidth * s : 0
|
||||
blurHeight: contentVisible ? root.modalHeight * s : 0
|
||||
blurWidth: (contentVisible && modalContainer.opacity > 0) ? root.modalWidth * s : 0
|
||||
blurHeight: (contentVisible && modalContainer.opacity > 0) ? root.modalHeight * s : 0
|
||||
blurRadius: root.cornerRadius
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,10 @@ PanelWindow {
|
||||
const region = Qt.createQmlObject(qml, barWindow, "BarBlurRegion");
|
||||
|
||||
if (hasBar) {
|
||||
region.item = Qt.binding(() => barUnitInset);
|
||||
region.x = Qt.binding(() => topBarMouseArea.x + barUnitInset.x + topBarSlide.x);
|
||||
region.y = Qt.binding(() => topBarMouseArea.y + barUnitInset.y + topBarSlide.y);
|
||||
region.width = Qt.binding(() => barUnitInset.width);
|
||||
region.height = Qt.binding(() => barUnitInset.height);
|
||||
region.radius = Qt.binding(() => barBackground.rt);
|
||||
}
|
||||
|
||||
@@ -184,6 +187,18 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: topBarSlide
|
||||
function onXChanged() {
|
||||
if (barWindow.blurRegion)
|
||||
barWindow.blurRegion.changed();
|
||||
}
|
||||
function onYChanged() {
|
||||
if (barWindow.blurRegion)
|
||||
barWindow.blurRegion.changed();
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: rebuild()
|
||||
Component.onDestruction: teardown()
|
||||
}
|
||||
|
||||
@@ -404,8 +404,8 @@ Item {
|
||||
readonly property real s: Math.min(1, contentContainer.scaleValue)
|
||||
blurX: contentContainer.x + contentContainer.width * (1 - s) * 0.5 + Theme.snap(contentContainer.animX, root.dpr)
|
||||
blurY: contentContainer.y + contentContainer.height * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr)
|
||||
blurWidth: shouldBeVisible ? contentContainer.width * s : 0
|
||||
blurHeight: shouldBeVisible ? contentContainer.height * s : 0
|
||||
blurWidth: (shouldBeVisible && contentWrapper.opacity > 0) ? contentContainer.width * s : 0
|
||||
blurHeight: (shouldBeVisible && contentWrapper.opacity > 0) ? contentContainer.height * s : 0
|
||||
blurRadius: Theme.cornerRadius
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user