Commit cfd95e6b authored by David Edmundson's avatar David Edmundson

fix(kcm): avoid recursive OpacityMask which leads to teardown crash

Summary:
In the current code OpacityMask's source is the parent which contains
itself, which doesn't make sense. Docs explicitly say this. [1]

This leads to a crash in teardown.

A quick reshuffle fixes it.

BUG: 419625

[1] https://doc.qt.io/qt-5/qml-qtgraphicaleffects-opacitymask.html#source-prop

Test Plan:
Found reproducible steps (see bug)
No longer crashes

Reviewers: romangg

Reviewed By: romangg

Subscribers: romangg, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29340
parent 74fdf5c9
......@@ -21,7 +21,7 @@ import QtQuick.Controls 2.3 as Controls
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.4 as Kirigami
Rectangle {
Item {
id: output
property bool isSelected: root.selectedOutput === model.index
......@@ -55,17 +55,21 @@ Rectangle {
id: palette
}
radius: 4
color: palette.window
smooth: true
Rectangle {
id: outline
radius: 4
color: palette.window
border {
color: isSelected ? palette.highlight : palette.shadow
width: 1
anchors.fill: parent
Behavior on color {
PropertyAnimation {
duration: 150
border {
color: isSelected ? palette.highlight : palette.shadow
width: 1
Behavior on color {
PropertyAnimation {
duration: 150
}
}
}
}
......@@ -231,7 +235,7 @@ Rectangle {
OpacityMask {
anchors.fill: orientationPanelContainer
source: orientationPanelContainer
maskSource: output
maskSource: outline
}
property point dragStartPosition
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment