D5144: Change the volume icon/mute button into a ToolButton
Chris Holland
noreply at phabricator.kde.org
Thu Mar 23 15:40:31 UTC 2017
Zren added a comment.
Yeah, it's probably dpi scaling.
And I didn't want to mess with the height of the ListItemBase. On further testing, it seems adding smallSpacing margins isn't as bad as I thought.
Back and Forth Gif: https://streamable.com/0ld55
F3154040: 2017-03-23___11-12-55.png <https://phabricator.kde.org/F3154040>
F3154037: 2017-03-23___11-14-42.png <https://phabricator.kde.org/F3154037>
If the increase in height is acceptable, I'll make a SmallToolButton
PlasmaComponents.ToolButton {
id: smallToolButton
property int iconSize: units.iconSizes.small
property int padding: units.smallSpacing
implicitWidth: iconSize + padding * 2
implicitHeight: iconSize + padding * 2
Layout.preferredWidth: implicitWidth
Layout.preferredHeight: implicitHeight
property alias icon: icon.source
PlasmaCore.IconItem {
id: icon
anchors.fill: parent
anchors.margins: parent.padding
visible: false
// From Plasma's ToolButtonStyle:
active: parent.hovered
colorGroup: parent.hovered ? PlasmaCore.Theme.ButtonColorGroup : PlasmaCore.ColorScope.colorGroup
}
}
REPOSITORY
R115 Plasma Audio Volume Applet
REVISION DETAIL
https://phabricator.kde.org/D5144
To: Zren, #plasma, subdiff, drosca
Cc: subdiff, drosca, plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170323/70c80586/attachment.html>
More information about the Plasma-devel
mailing list