Set visualParent of the QueryDialog

Now when the applet is on the Desktop the dialog is positioned properly
but in a panel it's still broken. Looks like a bug in PlasmaComponents.Dialog

CCBUG: 349887
wilder-5.14
Kai Uwe Broulik 11 years ago
parent be1c5fbfbc
commit 0e6c41f83e
  1. 8
      applets/lock_logout/contents/ui/lockout.qml

@ -97,7 +97,7 @@ Flow {
id: mouseArea id: mouseArea
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onReleased: clickHandler(modelData.operation) onReleased: clickHandler(modelData.operation, this)
PlasmaCore.ToolTipArea { PlasmaCore.ToolTipArea {
anchors.fill: parent anchors.fill: parent
@ -140,19 +140,19 @@ Flow {
} }
property QueryDialog sleepDialog property QueryDialog sleepDialog
function clickHandler(what) { function clickHandler(what, button) {
if (what == "suspendToDisk") { if (what == "suspendToDisk") {
if (!hibernateDialog) { if (!hibernateDialog) {
hibernateDialog = hibernateDialogComponent.createObject(lockout); hibernateDialog = hibernateDialogComponent.createObject(lockout);
} }
hibernateDialog.visualParent = button
hibernateDialog.open(); hibernateDialog.open();
} else if (what == "suspendToRam") { } else if (what == "suspendToRam") {
if (!sleepDialog) { if (!sleepDialog) {
sleepDialog = sleepDialogComponent.createObject(lockout); sleepDialog = sleepDialogComponent.createObject(lockout);
} }
sleepDialog.visualParent = button
sleepDialog.open(); sleepDialog.open();
} else { } else {

Loading…
Cancel
Save