mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Sync with upstream mobilecomponents
This updates to the state of bf7914b67c45e Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
6ffef818a8
commit
5e5c9830a4
4 changed files with 20 additions and 9 deletions
|
@ -73,10 +73,18 @@ MouseArea {
|
|||
}
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: button.parent
|
||||
onWidthChanged: button.x = button.parent.width/2 - button.width/2
|
||||
}
|
||||
onXChanged: {
|
||||
if (button.pressed) {
|
||||
globalDrawer.position = Math.min(1, Math.max(0, (x - button.parent.width/2 + button.width/2)/globalDrawer.contentItem.width));
|
||||
contextDrawer.position = Math.min(1, Math.max(0, (button.parent.width/2 - button.width/2 - x)/contextDrawer.contentItem.width));
|
||||
if (globalDrawer) {
|
||||
globalDrawer.position = Math.min(1, Math.max(0, (x - button.parent.width/2 + button.width/2)/globalDrawer.contentItem.width));
|
||||
}
|
||||
if (contextDrawer) {
|
||||
contextDrawer.position = Math.min(1, Math.max(0, (button.parent.width/2 - button.width/2 - x)/contextDrawer.contentItem.width));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue