aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2025-12-09 11:00:30 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2025-12-10 14:32:15 +0100
commit070af8ee203bf034db0c359731ade776e6e55c31 (patch)
treee1d7efbdc156cf985b4d49b19746fec49e732f88 /examples/quickcontrols
parent21d08249f6d5e511704940ba3e753afaf2aee673 (diff)
StyleKit: ensure we hide delegates upon setting 'visible: false'
As it stood, if you e.g did: control.background.shadow.visible: true control.hovered.background.shadow.visible: false Then the shadow would stay visible also when the control was hovered. The reason was because the shadow was already created in the normal state, and toggling visiblity after that point had no effect. This patch will fix this, so that we hide the shadow if its visibility is set to false after first having been created. We refrain from destroying it again, since doing so has a higher cost, and most likely, the hiding of the shadow is just temporarily. Task-number: QTBUG-130067 Pick-to: 6.11 Change-Id: Ib107b11b7f7fa638d7ac439348b9ccb75bf1bb1a Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'examples/quickcontrols')
-rw-r--r--examples/quickcontrols/stylekit/styles/Haze.qml2
1 files changed, 0 insertions, 2 deletions
diff --git a/examples/quickcontrols/stylekit/styles/Haze.qml b/examples/quickcontrols/stylekit/styles/Haze.qml
index 4ebbf31649..2f66c85f11 100644
--- a/examples/quickcontrols/stylekit/styles/Haze.qml
+++ b/examples/quickcontrols/stylekit/styles/Haze.qml
@@ -514,7 +514,6 @@ Style {
background.color: Qt.lighter("#544e52", 1.3)
background.border.color: "#3d373b"
background.shadow.visible: false
- background.shadow.color: "transparent"
}
CustomControl {
@@ -767,7 +766,6 @@ Style {
background.color: "#a0b1a0"
background.border.color: "#415a41"
background.shadow.visible: false
- background.shadow.color: "transparent"
}
scrollIndicator {