diff --git a/declarativeimports/plasmacomponents/qml/CommonDialog.qml b/declarativeimports/plasmacomponents/qml/CommonDialog.qml index 2232ab79a..3aeb5724e 100644 --- a/declarativeimports/plasmacomponents/qml/CommonDialog.qml +++ b/declarativeimports/plasmacomponents/qml/CommonDialog.qml @@ -48,7 +48,7 @@ Dialog { id: root property alias titleText: titleAreaText.text - property url titleIcon + property string titleIcon property variant buttonTexts: [] property bool privateCloseIcon: false @@ -111,8 +111,8 @@ Dialog { id: titleLayoutHelper // needed to make the text mirror correctly anchors { - left: parent.left - right: titleAreaIcon.source == "" ? parent.right : titleAreaIcon.left + right: parent.right + left: titleAreaIcon.source == "" ? parent.left : titleAreaIcon.right top: parent.top bottom: parent.bottom leftMargin: parent.margins.left @@ -134,35 +134,14 @@ Dialog { } } - Image { + IconLoader { id: titleAreaIcon - - anchors.right: parent.right + width: theme.iconSizeSmall + height: theme.iconSizeSmall + source: titleIcon + anchors.left: parent.left anchors.rightMargin: 4 anchors.verticalCenter: parent.verticalCenter - source: internal.iconSource() - sourceSize.height: 16 - sourceSize.width: 16 - - MouseArea { - id: iconMouseArea - - property bool pressCancelled - - anchors.centerIn: parent - width: parent.width + 4 - height: parent.height + 4 - enabled: privateCloseIcon && root.status == DialogStatus.Open - - onPressed: { - pressCancelled = false - } - onClicked: { - if (!pressCancelled) - root.reject() - } - onExited: pressCancelled = true - } } } diff --git a/declarativeimports/plasmacomponents/qml/QueryDialog.qml b/declarativeimports/plasmacomponents/qml/QueryDialog.qml index 383a5b09b..75126dc91 100644 --- a/declarativeimports/plasmacomponents/qml/QueryDialog.qml +++ b/declarativeimports/plasmacomponents/qml/QueryDialog.qml @@ -51,7 +51,6 @@ CommonDialog { property string message property string acceptButtonText property string rejectButtonText - property alias icon: root.titleIcon // for backwards compatibility onAcceptButtonTextChanged: internal.updateButtonTexts() onRejectButtonTextChanged: internal.updateButtonTexts()