[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-desktop/kcm-redesign/cursorTheme] kcms/cursortheme/package/contents/ui: make action buttons
From: Marco Martin <null () kde ! org>
Date: 2017-10-27 16:08:53
Message-ID: E1e87Bl-0001Y1-F5 () code ! kde ! org
[Download RAW message or body]
Git commit c8e10a27dfb6123b7ea9d9486b181a2e73a98eb8 by Marco Martin.
Committed on 27/10/2017 at 16:08.
Pushed by mart into branch 'kcm-redesign/cursorTheme'.
make action buttons selectable with keyboard only
M +24 -17 kcms/cursortheme/package/contents/ui/GridDelegate.qml
https://commits.kde.org/plasma-desktop/c8e10a27dfb6123b7ea9d9486b181a2e73a9=
8eb8
diff --git a/kcms/cursortheme/package/contents/ui/GridDelegate.qml b/kcms/c=
ursortheme/package/contents/ui/GridDelegate.qml
index 28f34fbd..b07ac3ca 100644
--- a/kcms/cursortheme/package/contents/ui/GridDelegate.qml
+++ b/kcms/cursortheme/package/contents/ui/GridDelegate.qml
@@ -78,7 +78,7 @@ T2.ItemDelegate {
Rectangle {
anchors.fill: parent
visible: actionsRow.children.length > 0
- opacity: delegate.hovered ? 1 : 0
+ opacity: delegate.hovered || (actionsScope.focus) ? 1 : 0
radius: Kirigami.Units.smallSpacing
color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Them=
e.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
=
@@ -92,28 +92,35 @@ T2.ItemDelegate {
}
}
=
- RowLayout {
- id: actionsRow
+ FocusScope {
+ id: actionsScope
anchors {
right: parent.right
bottom: parent.bottom
margins: Kirigami.Units.smallSpacing
}
- Repeater {
- model: delegate.actions
- delegate: Controls.ToolButton {
- Kirigami.Icon {
- anchors.centerIn: parent
- width: Kirigami.Units.iconSizes.smallMedium
- height: width
- source: modelData.iconName
+ width: actionsRow.width
+ height: actionsRow.height
+ RowLayout {
+ id: actionsRow
+ =
+ Repeater {
+ model: delegate.actions
+ delegate: Controls.ToolButton {
+ Kirigami.Icon {
+ anchors.centerIn: parent
+ width: Kirigami.Units.iconSizes.smallMedium
+ height: width
+ source: modelData.iconName
+ }
+ activeFocusOnTab: focus || delegate.focus
+ onClicked: modelData.trigger()
+ enabled: modelData.enabled
+ Controls.ToolTip.delay: 1000
+ Controls.ToolTip.timeout: 5000
+ Controls.ToolTip.visible: hovered
+ Controls.ToolTip.text: modelData.tooltip
}
- onClicked: modelData.trigger()
- enabled: modelData.enabled
- Controls.ToolTip.delay: 1000
- Controls.ToolTip.timeout: 5000
- Controls.ToolTip.visible: hovered
- Controls.ToolTip.text: modelData.tooltip
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic