[Differential] [Commented On] D4751: Button and Context Menu to Mute, Set Default Sink/Source, Active Port

Chris Holland noreply at phabricator.kde.org
Mon Feb 27 20:09:50 UTC 2017


Zren added a comment.


  I did, there wasn't any change from when I tested it with `Layout.maximumHeight`, because there's padding around the icon. Huh, I didn't post a screenshot, here:
  
  F2657863: 2017-02-27___14-51-23.png <https://phabricator.kde.org/F2657863>
  
  https://github.com/KDE/plasma-framework/blob/master/src/declarativeimports/plasmastyle/ToolButtonStyle.qml#L73
  
  The height of the icon is based off the implicitHeight of the invisible label, which is controlled by the `control.font`. However, adding `font.pixelSize: slider.height` did nothing so Iunno how to manipulate that. It's why I've used the pattern I mentioned in my widget <https://github.com/Zren/plasma-applets/blob/master/org.kde.plasma.volumewin7mixer/package/contents/ui/MixerItem.qml#L350-L357>.
  
  I didn't realize the mute button is also using the `IconItem { MouseArea { anchor.fill: parent } }` pattern. Hum. Logging the `onHeightChanged` prints this:
  
    qml: volumeIcon.height 24.740000000000002
    qml: volumeIcon.height 19.987499999999997
    qml: volumeIcon.height 20.2
    qml: contextMenuButton.height 45
    qml: contextMenuButton.height 24
  
  There's no easy way to log what the icon's height inside the `contextMenuButton` is, but I print screened and counted the pixels. There's 7 pixels around the icon. So that means the icon is only 10px (probably the default font height?).
  
  F2657920: 2017-02-27___15-07-15.png <https://phabricator.kde.org/F2657920>

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D4751

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: subdiff, #plasma, drosca, Zren
Cc: broulik, 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/20170227/12b05016/attachment.html>


More information about the Plasma-devel mailing list