Adjust for when there are no icons
This commit is contained in:
@@ -1085,6 +1085,7 @@ Item {
|
|||||||
required property int childCount
|
required property int childCount
|
||||||
|
|
||||||
readonly property bool hasCursor: root.cursorActive && row.index === root.selectedIndex
|
readonly property bool hasCursor: root.cursorActive && row.index === root.selectedIndex
|
||||||
|
readonly property bool hasIcon: row.icon.length > 0
|
||||||
|
|
||||||
width: ListView.view.width
|
width: ListView.view.width
|
||||||
height: root.rowHeightForDetail(row.detail)
|
height: root.rowHeightForDetail(row.detail)
|
||||||
@@ -1106,6 +1107,7 @@ Item {
|
|||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: iconText
|
id: iconText
|
||||||
|
visible: row.hasIcon
|
||||||
text: row.icon
|
text: row.icon
|
||||||
color: row.hasCursor ? root.selectedText : root.foreground
|
color: row.hasCursor ? root.selectedText : root.foreground
|
||||||
opacity: row.kind === "back" ? 0.7 : 1
|
opacity: row.kind === "back" ? 0.7 : 1
|
||||||
@@ -1121,8 +1123,8 @@ Item {
|
|||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: contentColumn
|
id: contentColumn
|
||||||
anchors.left: iconText.right
|
anchors.left: row.hasIcon ? iconText.right : parent.left
|
||||||
anchors.leftMargin: Style.space(6)
|
anchors.leftMargin: row.hasIcon ? Style.space(6) : Style.space(18)
|
||||||
anchors.right: trail.left
|
anchors.right: trail.left
|
||||||
anchors.rightMargin: Style.space(6)
|
anchors.rightMargin: Style.space(6)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|||||||
Reference in New Issue
Block a user