diff --git a/src/controls/ContextDrawer.qml b/src/controls/ContextDrawer.qml --- a/src/controls/ContextDrawer.qml +++ b/src/controls/ContextDrawer.qml @@ -70,7 +70,8 @@ */ OverlayDrawer { id: root - + handleClosedIcon.source: null + handleOpenIcon.source: null /** * title: string * A title for the action list that will be shown to the user when opens the drawer diff --git a/src/controls/GlobalDrawer.qml b/src/controls/GlobalDrawer.qml --- a/src/controls/GlobalDrawer.qml +++ b/src/controls/GlobalDrawer.qml @@ -67,7 +67,9 @@ OverlayDrawer { id: root edge: Qt.application.layoutDirection == Qt.RightToLeft ? Qt.RightEdge : Qt.LeftEdge - + handleClosedIcon.source: null + handleOpenIcon.source: null + /** * title: string * A title to be displayed on top of the drawer diff --git a/src/controls/OverlayDrawer.qml b/src/controls/OverlayDrawer.qml --- a/src/controls/OverlayDrawer.qml +++ b/src/controls/OverlayDrawer.qml @@ -108,19 +108,16 @@ edge = Qt.LeftEdge; } } - switch(edge) { - case Qt.LeftEdge: - return Qt.resolvedUrl("templates/private/MenuIcon.qml"); - case Qt.RightEdge: { - if (root.hasOwnProperty("actions")) { - return Qt.resolvedUrl("templates/private/ContextIcon.qml"); - } else { - return Qt.resolvedUrl("templates/private/GenericDrawerIcon.qml"); - } - } - default: - return ""; - } + + 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(edge == Qt.RightEdge && root.hasOwnProperty("actions")) { + return Qt.resolvedUrl("templates/private/ContextIcon.qml"); + }else { + return ""; + } } onItemChanged: { if(item) {