Prettify an if-else expression

This commit is contained in:
Emil Lundberg 2017-11-21 17:00:08 +01:00
parent 70684a0254
commit fbd3ad41db
No known key found for this signature in database
GPG Key ID: 5B9688125FF0B636

View File

@ -22,13 +22,10 @@ Rectangle {
signal doubleClick(var mouse)
signal refresh(bool force)
color: {
if (isSelected) {
return palette.highlight
} else {
return unselectedColor
}
}
color: (isSelected
? palette.highlight
: unselectedColor
)
Layout.minimumHeight: (
10 + issuerLbl.height + codeLbl.height + nameLbl.height