summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Holland <[email protected]>2017-03-08 21:46:01 -0500
committerChris Holland <[email protected]>2017-03-08 21:55:34 -0500
commit4d4867b8999617ac6ebfc613a1716b4950084765 (patch)
treec7aec46bf2f4f3cc1f320c5fde7f34c887da7dda
parent06c5ae6ba280cf521c26b4ef5b3e2ae84e835834 (diff)
Fix context menu button's icon size when on default DPI
Overlay an IconItem to stretch the icon to the edges of the button, and resize the button to `iconSizes.small`. Differential Revision: https://phabricator.kde.org/D4845
-rw-r--r--applet/contents/ui/ListItemBase.qml12
1 files changed, 10 insertions, 2 deletions
diff --git a/applet/contents/ui/ListItemBase.qml b/applet/contents/ui/ListItemBase.qml
index 39ddeaa..4796ad1 100644
--- a/applet/contents/ui/ListItemBase.qml
+++ b/applet/contents/ui/ListItemBase.qml
@@ -108,11 +108,19 @@ PlasmaComponents.ListItem {
}
PlasmaComponents.ToolButton {
id: contextMenuButton
- Layout.preferredHeight: slider.height
+ Layout.preferredHeight: units.iconSizes.small
Layout.preferredWidth: Layout.preferredHeight
checkable: true
- iconName: "application-menu"
onClicked: contextMenu.show()
+
+ PlasmaCore.IconItem {
+ anchors.fill: parent
+ source: "application-menu"
+
+ // From Plasma's ToolButtonStyle:
+ active: parent.hovered
+ colorGroup: parent.hovered ? PlasmaCore.Theme.ButtonColorGroup : PlasmaCore.ColorScope.colorGroup
+ }
}
}