[kwin/tabbox] Use property binding for x and y properties
After changes in PlasmaCore.Dialog we can finally get rid of updating the position on each visible change. It's not 100 % perfect yet, seems the binding on screenGeometry is not working properly. That needs investigation.
This commit is contained in:
parent
47f443479c
commit
8de72623c6
10 changed files with 20 additions and 60 deletions
|
@ -31,12 +31,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
dialog.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
|
@ -31,12 +31,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
dialog.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
|
@ -36,12 +36,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
informativeTabBox.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
informativeTabBox.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
|
@ -31,12 +31,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
dialog.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
|
@ -34,12 +34,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = screenGeometry.x;
|
||||
dialog.y = screenGeometry.y;
|
||||
}
|
||||
}
|
||||
x: screenGeometry.x
|
||||
y: screenGeometry.y
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
|
@ -31,12 +31,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
dialog.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
|
@ -31,12 +31,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
dialog.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
|
@ -31,12 +31,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
dialog.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
property real screenFactor: tabBox.screenGeometry.width/tabBox.screenGeometry.height
|
||||
|
|
|
@ -33,12 +33,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
dialog.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
|
@ -32,12 +32,8 @@ KWin.Switcher {
|
|||
location: PlasmaCore.Types.Floating
|
||||
visible: tabBox.visible
|
||||
flags: Qt.X11BypassWindowManagerHint
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
dialog.x = tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5;
|
||||
dialog.y = tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5;
|
||||
}
|
||||
}
|
||||
x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
|
||||
y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
|
||||
|
||||
mainItem: Item {
|
||||
id: dialogMainItem
|
||||
|
|
Loading…
Reference in a new issue