make user selection prettier!
This commit is contained in:
parent
11f0dc4de2
commit
3e1c0eaf4f
2 changed files with 15 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue