make user selection prettier!

This commit is contained in:
ash 2023-01-05 16:16:41 -05:00
parent 11f0dc4de2
commit 3e1c0eaf4f
2 changed files with 15 additions and 3 deletions

View file

@ -6,7 +6,7 @@ ComboBox {
currentIndex: model.lastIndex
textRole: "name"
indicator.visible: false
indicator.visible: true
hoverEnabled: true
contentItem: Text {
@ -36,5 +36,14 @@ ComboBox {
}
}
indicator {
}
background: Rectangle {
color: "transparent"
border.color: "transparent"
}
onActivated: print(currentIndex)
}

View file

@ -19,8 +19,11 @@ Column {
height: inputHeight
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
highlighted: userList.currentIndex == index
contentItem: Text {
id: entryText
renderType: Text.NativeRendering
font.family: config.Font
font.pointSize: config.LoginFontSize
@ -35,7 +38,7 @@ Column {
background: Rectangle {
id: userEntryBackground
color: config.AccentLight
color: highlighted ? config.AccentLight : Qt.darker(config.AccentText, 1.3)
radius: config.CornerRadius
}
@ -45,7 +48,7 @@ Column {
when: userEntry.hovered
PropertyChanges {
target: userEntryBackground
color: Qt.lighter(config.AccentLight, 1.2)
color: highlighted ? Qt.lighter(config.AccentLight, 1.2) : Qt.darker(config.AccentText, 1.5)
}
}
]