You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2021/11/12 17:09:03 UTC
[isis] 02/07: ISIS-2348 Stackup dialogs visually (with some offset)
This is an automated email from the ASF dual-hosted git repository.
joergrade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 92f110fe0f8769a6a5963e123a20fdbf5294c1e5
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Wed Nov 10 18:46:21 2021 +0100
ISIS-2348 Stackup dialogs visually (with some offset)
---
.../main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDialog.kt | 5 +++--
.../main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDialog.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDialog.kt
index 6286239..1403df5 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDialog.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDialog.kt
@@ -128,8 +128,9 @@ class RoDialog(
}
fun open(at: Point = Point(100, 100)): Widget {
- left = CssSize(at.x, UNIT.px)
- top = CssSize(at.y, UNIT.px)
+ val offset = UiManager.getNumberOfPopups() * 4
+ left = CssSize(at.x + offset, UNIT.px)
+ top = CssSize(at.y + offset, UNIT.px)
UiManager.openDialog(this)
super.show()
okButton.focus()
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt
index a75b415..c7fcda3 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt
@@ -242,6 +242,10 @@ object UiManager {
}
}
+ fun getNumberOfPopups(): Int {
+ return popups.size
+ }
+
fun performUserAction(aggregator: BaseAggregator, obj: TObject) {
setBusyCursor()
getEventStore().addUserAction(aggregator, obj)