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

Loading…
Cancel
Save