diff --git a/share/qtcreator/qmldesigner/connectionseditor/MyListViewDelegate.qml b/share/qtcreator/qmldesigner/connectionseditor/MyListViewDelegate.qml index 936d06daee6..5ca53985d85 100644 --- a/share/qtcreator/qmldesigner/connectionseditor/MyListViewDelegate.qml +++ b/share/qtcreator/qmldesigner/connectionseditor/MyListViewDelegate.qml @@ -3,27 +3,52 @@ import QtQuick import QtQuick.Controls +import QtQuick.Layouts +import StudioTheme as StudioTheme ItemDelegate { id: control - hoverEnabled: true - contentItem: Text { - leftPadding: 8 - rightPadding: 8 - text: control.text - font: control.font - opacity: enabled ? 1.0 : 0.3 - color: control.hovered ? "#111111" : "white" - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight + property StudioTheme.ControlStyle style: StudioTheme.Values.controlStyle + + hoverEnabled: true + verticalPadding: 0 + rightPadding: 10 // ScrollBar thickness + + contentItem: RowLayout { + Text { + Layout.fillWidth: true + leftPadding: 8 + rightPadding: 8 + text: control.text + font: control.font + opacity: enabled ? 1.0 : 0.3 + color: control.hovered ? control.style.text.selectedText : control.style.text.idle + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + Item { + visible: control.childCount + width: 30 + height: 30 + + Text { + id: chevronLeft + font.family: StudioTheme.Constants.iconFont.family + font.pixelSize: control.style.baseIconFontSize + color: control.hovered ? control.style.text.selectedText : control.style.text.idle + text: StudioTheme.Constants.forward_medium + anchors.centerIn: parent + } + } } background: Rectangle { implicitWidth: 200 implicitHeight: 30 opacity: enabled ? 1 : 0.3 - color: control.hovered ? "#4DBFFF" : "transparent" + color: control.hovered ? control.style.interaction : "transparent" } } diff --git a/share/qtcreator/qmldesigner/connectionseditor/MyTreeViewDelegate.qml b/share/qtcreator/qmldesigner/connectionseditor/MyTreeViewDelegate.qml index 366860b6757..549cb0fd7b5 100644 --- a/share/qtcreator/qmldesigner/connectionseditor/MyTreeViewDelegate.qml +++ b/share/qtcreator/qmldesigner/connectionseditor/MyTreeViewDelegate.qml @@ -8,6 +8,9 @@ import StudioTheme as StudioTheme T.TreeViewDelegate { id: control + + property StudioTheme.ControlStyle style: StudioTheme.Values.controlStyle + hoverEnabled: true implicitWidth: 200 implicitHeight: 30 @@ -28,8 +31,8 @@ T.TreeViewDelegate { Text { id: icon font.family: StudioTheme.Constants.iconFont.family - font.pixelSize: StudioTheme.Values.smallIconFontSize - color: control.hovered ? "#111111" : "white" // TODO colors + font.pixelSize: control.style.smallIconFontSize + color: control.hovered ? control.style.text.selectedText : control.style.text.idle text: StudioTheme.Constants.sectionToggle rotation: control.expanded ? 0 : -90 anchors.centerIn: parent @@ -39,14 +42,14 @@ T.TreeViewDelegate { background: Rectangle { implicitWidth: 200 implicitHeight: 30 - color: control.hovered ? "#4DBFFF" : "transparent" + color: control.hovered ? control.style.interaction : "transparent" } contentItem: Text { text: control.text font: control.font opacity: enabled ? 1.0 : 0.3 - color: control.hovered ? "#111111" : "white" + color: control.hovered ? control.style.text.selectedText : control.style.text.idle horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter elide: Text.ElideRight diff --git a/share/qtcreator/qmldesigner/connectionseditor/SuggestionPopup.qml b/share/qtcreator/qmldesigner/connectionseditor/SuggestionPopup.qml index fb9643ca14b..735bc9364cd 100644 --- a/share/qtcreator/qmldesigner/connectionseditor/SuggestionPopup.qml +++ b/share/qtcreator/qmldesigner/connectionseditor/SuggestionPopup.qml @@ -80,7 +80,7 @@ Controls.Popup { onClicked: { stack.pop(Controls.StackView.Immediate) - root.listModel.goUp() //treeModel.pop() + root.listModel.goUp() } }