diff options
author | Mark Burton <burtoogle@gmail.com> | 2020-06-04 14:04:14 +0300 |
---|---|---|
committer | Mark Burton <burtoogle@gmail.com> | 2020-06-04 14:04:29 +0300 |
commit | f8c86cce4d02e9c0188219f6e43738bedacf639a (patch) | |
tree | 6db3675ab477079d9375c39e2e8795230a34fb1a /resources/qml/Toolbar.qml | |
parent | 74984ca12a56f4e39a6077a839528c1bb4f961cd (diff) |
Improve readability and add comments.
Diffstat (limited to 'resources/qml/Toolbar.qml')
-rw-r--r-- | resources/qml/Toolbar.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index da986cf0bf..0bf09b4d18 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -246,7 +246,14 @@ Item } PropertyChanges { target: panelBorder - anchors.bottomMargin: ((base.activeY + UM.Theme.getSize("button").height) > panelBorder.height) ? -(base.activeY + UM.Theme.getSize("button").height) : -panelBorder.height + anchors.bottomMargin: { + if (panelBorder.height > (base.activeY + UM.Theme.getSize("button").height)) { + // panel is tall, align the top of the panel with the top of the first tool button + return -panelBorder.height + } + // align the bottom of the panel with the bottom of the selected tool button + return -(base.activeY + UM.Theme.getSize("button").height) + } } } ] |