aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/tracing/qml/RowLabel.qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-06-28 11:33:06 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-07-05 12:31:31 +0000
commitbcc62b6f72ef441c6a82cb69e921e7a5fb0acf75 (patch)
treeb7c56272dbb424fe74c9f627cfee8ef07fc4e04f /src/libs/tracing/qml/RowLabel.qml
parent163d5c5ce87b4ac7dcdb7dab001538a5240ab6ef (diff)
Tracing: port to QtQuickControls2
Controls1 is deprecated. Also, we can easily show tooltips for all buttons this way. Change-Id: I08c3e49139aa31f83e6c7585d8e33ee0140ce5b0 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src/libs/tracing/qml/RowLabel.qml')
-rw-r--r--src/libs/tracing/qml/RowLabel.qml36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/libs/tracing/qml/RowLabel.qml b/src/libs/tracing/qml/RowLabel.qml
index be394b5e7e..e73d51b291 100644
--- a/src/libs/tracing/qml/RowLabel.qml
+++ b/src/libs/tracing/qml/RowLabel.qml
@@ -24,8 +24,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtQuick.Controls 1.2
-import QtQuick.Controls.Styles 1.2
+import QtQuick.Controls 2.2
import TimelineTheme 1.0
Button {
@@ -38,25 +37,26 @@ Button {
signal setRowHeight(int newHeight)
property string labelText: label.description ? label.description : qsTr("[unknown]")
- action: Action {
- onTriggered: button.selectBySelectionId();
- tooltip: button.labelText + (label.displayName ? (" (" + label.displayName + ")") : "")
+
+ onPressed: selectBySelectionId();
+ ToolTip.text: labelText + (label.displayName ? (" (" + label.displayName + ")") : "")
+ ToolTip.visible: hovered
+ ToolTip.delay: 1000
+
+ background: Rectangle {
+ border.width: 1
+ border.color: Theme.color(Theme.Timeline_DividerColor)
+ color: Theme.color(Theme.PanelStatusBarBackgroundColor)
}
- style: ButtonStyle {
- background: Rectangle {
- border.width: 1
- border.color: Theme.color(Theme.Timeline_DividerColor)
- color: Theme.color(Theme.PanelStatusBarBackgroundColor)
- }
- label: TimelineText {
- text: button.labelText
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignLeft
- elide: Text.ElideRight
- color: Theme.color(Theme.PanelTextColorLight)
- }
+ contentItem: TimelineText {
+ text: button.labelText
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignLeft
+ elide: Text.ElideRight
+ color: Theme.color(Theme.PanelTextColorLight)
}
+
MouseArea {
hoverEnabled: true
property bool resizing: false