Commit 2d3e2b7d authored by Marco Martin's avatar Marco Martin
Browse files

use implicit size to not cause binding loops

don't set layout size hints from the contents size. this will cause
binding loops. use the implicit size instead.
This solves an issue visible especially on wayland (different roundtrip of timing of resizes in x11 seems to mask this problem) where the clock tooltip
sometimes gets stuck in an infinite resize loop freezing the whole plasma shell
BUG:422072
parent 7dd3aa10
......@@ -15,8 +15,8 @@ Item {
property int preferredTextWidth: PlasmaCore.Units.gridUnit * 20
width: childrenRect.width + PlasmaCore.Units.gridUnit
height: childrenRect.height + PlasmaCore.Units.gridUnit
implicitWidth: mainLayout.implicitWidth + PlasmaCore.Units.gridUnit
implicitHeight: mainLayout.implicitHeight + PlasmaCore.Units.gridUnit
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true
......@@ -24,6 +24,7 @@ Item {
PlasmaCore.ColorScope.inherit: false
ColumnLayout {
id: mainLayout
anchors {
left: parent.left
top: parent.top
......
......@@ -75,10 +75,10 @@ Item {
Plasmoid.toolTipItem: Loader {
id: tooltipLoader
Layout.minimumWidth: item ? item.width : 0
Layout.maximumWidth: item ? item.width : 0
Layout.minimumHeight: item ? item.height : 0
Layout.maximumHeight: item ? item.height : 0
Layout.minimumWidth: item ? item.implicitWidth : 0
Layout.maximumWidth: item ? item.implicitWidth : 0
Layout.minimumHeight: item ? item.implicitHeight : 0
Layout.maximumHeight: item ? item.implicitHeight : 0
source: "Tooltip.qml"
}
......
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