D23154: allow to set custom icon for the left drawer handle

Marco Martin noreply at phabricator.kde.org
Wed Aug 14 16:51:46 BST 2019


mart added inline comments.

INLINE COMMENTS

> OverlayDrawer.qml:111
>                      }
>                      switch(edge) {
>                      case Qt.LeftEdge:

you can write it more compact and avoid code duplication, you can do:

if (root.handleClosedIcon.source && root.handleOpenIcon.source) {

  return Qt.resolvedUrl("templates/private/GenericDrawerIcon.qml");

} else if (edge ==Qt.LeftEdge ) {

  return Qt.resolvedUrl("templates/private/MenuIcon.qml");

} else if()...
....}

> OverlayDrawer.qml:113
>                      case Qt.LeftEdge:
> -                        return Qt.resolvedUrl("templates/private/MenuIcon.qml");
> +                        if(root.handleClosedIcon.source && root.handleOpenIcon.source){
> +							return Qt.resolvedUrl("templates/private/GenericDrawerIcon.qml");

also, coding style
spaces between if an ( and between ) and {

if () {
}

REPOSITORY
  R169 Kirigami

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

To: camiloh, #kirigami, mart
Cc: plasma-devel, fbampaloukas, domson, dkardarakos, apol, davidedmundson, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190814/7f90d44c/attachment.html>


More information about the Plasma-devel mailing list