mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 14:49:44 -09:00
kcms: follow HIG for list items with inline actions
Use raised buttons and alternating backgrounds, as recommended by ths HIG; this helps distinguish interactive buttons from list items' decorative icons, and helps the eye associate the controls on the right with the text and icons on the left.
This commit is contained in:
parent
1d5be3d338
commit
dd124d0def
2 changed files with 9 additions and 1 deletions
|
|
@ -33,6 +33,9 @@ KCM.ScrollViewKCM {
|
|||
delegate: QQC2.ItemDelegate {
|
||||
width: ListView.view.width
|
||||
|
||||
// Because there's content on both sides of the list item
|
||||
Kirigami.Theme.useAlternateBackgroundColor: true
|
||||
|
||||
onClicked: kcm.configureActivity(model.id);
|
||||
|
||||
contentItem: RowLayout {
|
||||
|
|
@ -51,7 +54,7 @@ KCM.ScrollViewKCM {
|
|||
textFormat: Text.PlainText
|
||||
}
|
||||
|
||||
QQC2.ToolButton {
|
||||
QQC2.Button {
|
||||
visible: kcm.isNewActivityAuthorized
|
||||
enabled: activitiesList.count > 1
|
||||
icon.name: "edit-delete"
|
||||
|
|
|
|||
|
|
@ -50,9 +50,13 @@ Item {
|
|||
id: delegate
|
||||
implicitWidth: itemDelegate.width
|
||||
|
||||
// Because there's content on both sides of the list item
|
||||
Kirigami.Theme.useAlternateBackgroundColor: true
|
||||
|
||||
// There's no need for a list item to ever be selected
|
||||
down: false
|
||||
highlighted: false
|
||||
hoverEnabled: false
|
||||
|
||||
contentItem: RowLayout {
|
||||
spacing: Kirigami.Units.smallSpacing
|
||||
|
|
@ -108,6 +112,7 @@ Item {
|
|||
Kirigami.ActionToolBar {
|
||||
Layout.fillWidth: false
|
||||
actions: itemDelegate.actions
|
||||
flat: false // Only use flat buttons in window toolbars
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue