no i18n right now
This commit is contained in:
parent
112fb3f78a
commit
2168bdec75
@ -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
|
//If no item was specified try to align at the center of the parent view
|
||||||
QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
|
QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
|
||||||
if (parentItem && parentItem->window()) {
|
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);
|
return parentItem->window()->geometry().center() - QPoint(width()/2, height()/2);
|
||||||
} else {
|
} else {
|
||||||
|
qDebug() << "No QQuickItem as parent found";
|
||||||
return QPoint();
|
return QPoint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
qDebug() << "I've an Item";
|
||||||
QPointF pos = item->mapToScene(QPointF(0, 0));
|
QPointF pos = item->mapToScene(QPointF(0, 0));
|
||||||
|
qDebug() << "I've an Item at " << pos;
|
||||||
if (item->window() && item->window()->screen()) {
|
if (item->window() && item->window()->screen()) {
|
||||||
pos = item->window()->mapToGlobal(pos.toPoint());
|
pos = item->window()->mapToGlobal(pos.toPoint());
|
||||||
} else {
|
} else {
|
||||||
@ -309,7 +312,7 @@ bool DialogProxy::isActiveWindow() const
|
|||||||
void DialogProxy::activateWindow()
|
void DialogProxy::activateWindow()
|
||||||
{
|
{
|
||||||
qDebug();
|
qDebug();
|
||||||
setWindowState(Qt::WindowActive);
|
//setWindowState(Qt::WindowActive);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DialogProxy::windowFlags() const
|
int DialogProxy::windowFlags() const
|
||||||
|
@ -162,12 +162,15 @@ PlasmaComponents.Page {
|
|||||||
PlasmaComponents.QueryDialog {
|
PlasmaComponents.QueryDialog {
|
||||||
id: queryDialog
|
id: queryDialog
|
||||||
//windowFlags: Qt.Popup
|
//windowFlags: Qt.Popup
|
||||||
//visualParent: root
|
visualParent: root
|
||||||
titleText: "Fruit Inquiry"
|
titleText: "Fruit Inquiry"
|
||||||
message: "Would you rather have apples or oranges?"
|
message: "Would you rather have apples or oranges?"
|
||||||
acceptButtonText: i18n("Apples")
|
acceptButtonText: "Apples"
|
||||||
rejectButtonText: i18n("Oranges")
|
rejectButtonText: "Oranges"
|
||||||
onButtonClicked: close()
|
onButtonClicked: {
|
||||||
|
print("hey");
|
||||||
|
queryDialog.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlasmaComponents.ButtonRow {
|
PlasmaComponents.ButtonRow {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user