Make some CredentialItem properties readonly

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

View File

@ -6,15 +6,7 @@ Rectangle {
property var code
property var credential
property bool isExpired: true
property bool hasCustomTimeBar: (
credential.period !== 30
&& (credential.oath_type === 'TOTP' || credential.touch)
)
property bool isSelected: false
property color textColor: (isSelected
? palette.highlightedText
: palette.windowText
)
property bool timerRunning: false
property color unselectedColor
@ -22,6 +14,15 @@ Rectangle {
signal doubleClick(var mouse)
signal refresh(bool force)
readonly property bool hasCustomTimeBar: (
credential.period !== 30
&& (credential.oath_type === 'TOTP' || credential.touch)
)
readonly property color textColor: (isSelected
? palette.highlightedText
: palette.windowText
)
color: (isSelected
? palette.highlight
: unselectedColor