aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/tracing
diff options
context:
space:
mode:
authorAlessandro Portale <[email protected]>2023-03-21 12:35:38 +0100
committerAlessandro Portale <[email protected]>2023-03-21 13:40:31 +0000
commit20af0711d524a8988465e4ce9f716515398243a8 (patch)
treef498a4790457babcf604030396ff264055a536c7 /src/libs/tracing
parent9ddd1e1d362e259aeb291031c27c0021c7f922bd (diff)
Tracing: Fix category label appearance after manual reordering
The drag item remained visible although the item height was supposedly set to 0. This fix uses the visibility property in order to show/hide the drag item. Fixes: QTCREATORBUG-28930 Change-Id: I2233eed585f94eab5d71e0aa2743b791390c249c Reviewed-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'src/libs/tracing')
-rw-r--r--src/libs/tracing/qml/CategoryLabel.qml14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libs/tracing/qml/CategoryLabel.qml b/src/libs/tracing/qml/CategoryLabel.qml
index 4226195cbba..58704aa175a 100644
--- a/src/libs/tracing/qml/CategoryLabel.qml
+++ b/src/libs/tracing/qml/CategoryLabel.qml
@@ -174,9 +174,10 @@ Item {
id: dragger
property int visualIndex: labelContainer.visualIndex
width: labelContainer.width
- height: 0
+ height: labelContainer.height
color: Theme.color(Theme.PanelStatusBarBackgroundColor)
opacity: 0.5
+ visible: Drag.active
anchors.left: parent.left
// anchor to top so that it reliably snaps back after dragging
@@ -184,16 +185,13 @@ Item {
Drag.active: dragArea.drag.active
Drag.onActiveChanged: {
- // We don't want height or text to be changed when reordering occurs, so we don't make
- // them properties.
+ // We don't want text to be changed when reordering occurs, so we don't make
+ // it a property
draggerText.text = txt.text;
- if (Drag.active) {
- height = labelContainer.height;
+ if (Drag.active)
labelContainer.dragStarted();
- } else {
- height = 0;
+ else
labelContainer.dragStopped();
- }
}
states: [