plasmoid: fix highlighted session text unreadable on light themes
Replace KirigamiDelegates.RoundedItemDelegate (not available in all Kirigami versions) with PlasmaComponents.ItemDelegate. Add explicit highlightedTextColor bindings to labels and icon in the session list delegate for both KF5 and KF6 builds.
This commit is contained in:
parent
1552fce126
commit
e87038ca04
|
|
@ -152,9 +152,11 @@ Item {
|
|||
if (state.startsWith("calling")) return "system-run"
|
||||
return "media-playback-start"
|
||||
}
|
||||
color: modelData.state !== "idle"
|
||||
? Kirigami.Theme.positiveTextColor
|
||||
: Kirigami.Theme.textColor
|
||||
color: sessionDelegate.highlighted
|
||||
? Kirigami.Theme.highlightedTextColor
|
||||
: (modelData.state !== "idle"
|
||||
? Kirigami.Theme.positiveTextColor
|
||||
: Kirigami.Theme.textColor)
|
||||
}
|
||||
|
||||
PlasmaComponents.Label {
|
||||
|
|
@ -165,6 +167,9 @@ Item {
|
|||
font.family: "monospace"
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize
|
||||
visible: !sessionDelegate.renaming
|
||||
color: sessionDelegate.highlighted
|
||||
? Kirigami.Theme.highlightedTextColor
|
||||
: Kirigami.Theme.textColor
|
||||
}
|
||||
|
||||
TextField {
|
||||
|
|
@ -200,6 +205,9 @@ Item {
|
|||
opacity: 0.7
|
||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize
|
||||
visible: !sessionDelegate.renaming
|
||||
color: sessionDelegate.highlighted
|
||||
? Kirigami.Theme.highlightedTextColor
|
||||
: Kirigami.Theme.textColor
|
||||
}
|
||||
|
||||
PlasmaComponents.ToolButton {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import org.kde.plasma.plasmoid
|
|||
import org.kde.plasma.components as PlasmaComponents
|
||||
import org.kde.plasma.extras as PlasmaExtras
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigami.delegates as KirigamiDelegates
|
||||
import org.ollie.private as Ollie
|
||||
|
||||
PlasmoidItem {
|
||||
|
|
@ -139,7 +138,7 @@ PlasmoidItem {
|
|||
clip: true
|
||||
model: dbus.sessions
|
||||
|
||||
delegate: KirigamiDelegates.RoundedItemDelegate {
|
||||
delegate: PlasmaComponents.ItemDelegate {
|
||||
id: sessionDelegate
|
||||
width: sessionList.width
|
||||
highlighted: modelData.id === dbus.activeSessionId
|
||||
|
|
@ -158,9 +157,11 @@ PlasmoidItem {
|
|||
if (state.startsWith("calling")) return "system-run"
|
||||
return "media-playback-start"
|
||||
}
|
||||
color: modelData.state !== "idle"
|
||||
? Kirigami.Theme.positiveTextColor
|
||||
: Kirigami.Theme.textColor
|
||||
color: sessionDelegate.highlighted
|
||||
? Kirigami.Theme.highlightedTextColor
|
||||
: (modelData.state !== "idle"
|
||||
? Kirigami.Theme.positiveTextColor
|
||||
: Kirigami.Theme.textColor)
|
||||
}
|
||||
|
||||
PlasmaComponents.Label {
|
||||
|
|
@ -171,6 +172,9 @@ PlasmoidItem {
|
|||
font.family: "monospace"
|
||||
font.pixelSize: Kirigami.Theme.defaultFont.pixelSize
|
||||
visible: !sessionDelegate.renaming
|
||||
color: sessionDelegate.highlighted
|
||||
? Kirigami.Theme.highlightedTextColor
|
||||
: Kirigami.Theme.textColor
|
||||
}
|
||||
|
||||
TextField {
|
||||
|
|
@ -206,6 +210,9 @@ PlasmoidItem {
|
|||
opacity: 0.7
|
||||
font.pixelSize: Kirigami.Theme.smallFont.pixelSize
|
||||
visible: !sessionDelegate.renaming
|
||||
color: sessionDelegate.highlighted
|
||||
? Kirigami.Theme.highlightedTextColor
|
||||
: Kirigami.Theme.textColor
|
||||
}
|
||||
|
||||
PlasmaComponents.ToolButton {
|
||||
|
|
|
|||
Reference in New Issue