From 2168bdec7501713141076d61737061b2eb3a0a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Wed, 27 Feb 2013 14:54:52 +0100 Subject: [PATCH] no i18n right now --- src/declarativeimports/core/dialog.cpp | 7 +++++-- .../testcomponentsapplet/contents/ui/DialogsPage.qml | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/declarativeimports/core/dialog.cpp b/src/declarativeimports/core/dialog.cpp index b225a313d..6dfb6196d 100644 --- a/src/declarativeimports/core/dialog.cpp +++ b/src/declarativeimports/core/dialog.cpp @@ -208,13 +208,16 @@ QPoint DialogProxy::popupPosition(QQuickItem *item, Qt::AlignmentFlag alignment) //If no item was specified try to align at the center of the parent view QQuickItem *parentItem = qobject_cast(parent()); if (parentItem && parentItem->window()) { + qDebug() << "NO visual parent ... Centering at " << (parentItem->window()->geometry().center() - QPoint(width()/2, height()/2)); return parentItem->window()->geometry().center() - QPoint(width()/2, height()/2); } else { + qDebug() << "No QQuickItem as parent found"; return QPoint(); } } - + qDebug() << "I've an Item"; QPointF pos = item->mapToScene(QPointF(0, 0)); + qDebug() << "I've an Item at " << pos; if (item->window() && item->window()->screen()) { pos = item->window()->mapToGlobal(pos.toPoint()); } else { @@ -309,7 +312,7 @@ bool DialogProxy::isActiveWindow() const void DialogProxy::activateWindow() { qDebug(); - setWindowState(Qt::WindowActive); + //setWindowState(Qt::WindowActive); } int DialogProxy::windowFlags() const diff --git a/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml b/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml index 6761b1cd4..68d27dc0c 100644 --- a/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml +++ b/src/shell/applets/testcomponentsapplet/contents/ui/DialogsPage.qml @@ -162,12 +162,15 @@ PlasmaComponents.Page { PlasmaComponents.QueryDialog { id: queryDialog //windowFlags: Qt.Popup - //visualParent: root + visualParent: root titleText: "Fruit Inquiry" message: "Would you rather have apples or oranges?" - acceptButtonText: i18n("Apples") - rejectButtonText: i18n("Oranges") - onButtonClicked: close() + acceptButtonText: "Apples" + rejectButtonText: "Oranges" + onButtonClicked: { + print("hey"); + queryDialog.close(); + } } } PlasmaComponents.ButtonRow {