From 832d2572c5e6badefb98e35734cf99aba5c4ef51 Mon Sep 17 00:00:00 2001 From: rveenstra Date: Wed, 27 Mar 2024 19:27:40 +1000 Subject: [PATCH 1/2] add scrollbar to main ui and powertools ui --- exts/cesium.omniverse/cesium/omniverse/ui/main_window.py | 6 ++++-- .../cesium/powertools/powertools_window.py | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/exts/cesium.omniverse/cesium/omniverse/ui/main_window.py b/exts/cesium.omniverse/cesium/omniverse/ui/main_window.py index 4bc476da..19d401c2 100644 --- a/exts/cesium.omniverse/cesium/omniverse/ui/main_window.py +++ b/exts/cesium.omniverse/cesium/omniverse/ui/main_window.py @@ -231,8 +231,10 @@ def _build_fn(self): clicked_fn=self._sign_out_button_clicked, enabled=False, ) - self._quick_add_widget = CesiumOmniverseQuickAddWidget(self._cesium_omniverse_interface) - self._sign_in_widget = CesiumOmniverseSignInWidget(self._cesium_omniverse_interface, visible=False) + with ui.ScrollingFrame(): + with ui.VStack(spacing=0): + self._quick_add_widget = CesiumOmniverseQuickAddWidget(self._cesium_omniverse_interface) + self._sign_in_widget = CesiumOmniverseSignInWidget(self._cesium_omniverse_interface, visible=False) def _add_button_clicked(self) -> None: if not self._add_button or not self._add_button.enabled: diff --git a/exts/cesium.powertools/cesium/powertools/powertools_window.py b/exts/cesium.powertools/cesium/powertools/powertools_window.py index beb086dd..62504fbe 100644 --- a/exts/cesium.powertools/cesium/powertools/powertools_window.py +++ b/exts/cesium.powertools/cesium/powertools/powertools_window.py @@ -65,6 +65,7 @@ def destroy(self) -> None: super().destroy() def _build_fn(self): - with ui.VStack(spacing=4): - for action in self._actions: - action.button() + with ui.ScrollingFrame(): + with ui.VStack(spacing=4): + for action in self._actions: + action.button() From e7086556c307adb7f6e1f3242df845fa4114e1e9 Mon Sep 17 00:00:00 2001 From: rveenstra Date: Wed, 27 Mar 2024 20:03:53 +1000 Subject: [PATCH 2/2] formatting --- exts/cesium.omniverse/cesium/omniverse/ui/main_window.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exts/cesium.omniverse/cesium/omniverse/ui/main_window.py b/exts/cesium.omniverse/cesium/omniverse/ui/main_window.py index 19d401c2..42ae8551 100644 --- a/exts/cesium.omniverse/cesium/omniverse/ui/main_window.py +++ b/exts/cesium.omniverse/cesium/omniverse/ui/main_window.py @@ -234,7 +234,9 @@ def _build_fn(self): with ui.ScrollingFrame(): with ui.VStack(spacing=0): self._quick_add_widget = CesiumOmniverseQuickAddWidget(self._cesium_omniverse_interface) - self._sign_in_widget = CesiumOmniverseSignInWidget(self._cesium_omniverse_interface, visible=False) + self._sign_in_widget = CesiumOmniverseSignInWidget( + self._cesium_omniverse_interface, visible=False + ) def _add_button_clicked(self) -> None: if not self._add_button or not self._add_button.enabled: