Fix text colouring when the SwipeListItem is pressed (or checked).
With this change, the theme's "active text" colour should now be used for the pressed/checked state, resulting in better contrast.master
parent
077e0b82d7
commit
07108d9be6
|
@ -18,6 +18,7 @@ Kirigami.SwipeListItem {
|
|||
property Models.Account account: null
|
||||
property bool alive: account !== null
|
||||
property bool tokenAvailable: alive && account.token && account.token.length > 0
|
||||
property color labelColor: root.pressed || root.checked ? root.activeTextColor : root.textColor
|
||||
|
||||
visible: alive
|
||||
enabled: alive
|
||||
|
|
|
@ -33,5 +33,6 @@ AccountEntryViewBase {
|
|||
id: mainLayout
|
||||
accountName: account.name
|
||||
tokenValue: account.token
|
||||
labelColor: root.labelColor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ AccountEntryViewBase {
|
|||
id: mainLayout
|
||||
accountName: account.name
|
||||
tokenValue: account.token
|
||||
labelColor: root.labelColor
|
||||
|
||||
/*
|
||||
* For some reason the running NumberAnimation seems to trigger very sluggish QML UI when the window is resized.
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.kde.kirigami 2.8 as Kirigami
|
|||
Item {
|
||||
property string accountName
|
||||
property string tokenValue
|
||||
property color labelColor
|
||||
|
||||
id: root
|
||||
/*
|
||||
|
@ -28,6 +29,7 @@ Item {
|
|||
font.weight: Font.Light
|
||||
elide: Text.ElideRight
|
||||
text: accountName
|
||||
color: labelColor
|
||||
anchors.left: root.left
|
||||
anchors.verticalCenter: root.verticalCenter
|
||||
}
|
||||
|
@ -36,6 +38,7 @@ Item {
|
|||
horizontalAlignment: Text.AlignRight
|
||||
font.weight: Font.Bold
|
||||
text: tokenValue && tokenValue.length > 0 ? tokenValue : i18nc("placeholder text if no token is available", "(refresh)")
|
||||
color: labelColor
|
||||
anchors.right: root.right
|
||||
anchors.verticalCenter: root.verticalCenter
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue