Skip to content

Commit

Permalink
fix: window resizing for images + scene vis
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-schaefer committed Mar 17, 2023
1 parent 8da8b4a commit 5d1ef2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions balanna/display_scenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ def __init__(

frame.setLayout(vl)
self.setCentralWidget(frame)
# If image and scene keys are displayed, somehow the scene widgets start with zero width.
# Therefore, resize the window before startup by multiplying the current size with the
# number of scene widgets.
if len(image_keys) > 0 and len(scene_keys) > 0:
w = self.size().width() + self.size().width() * len(scene_keys)
h = self.size().height()
self.resize(w, h)
self.show()

# Set up video directory for storing screenshots.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='balanna',
version='0.4',
version='0.5',
description='Visualization Tools for Humans and Stuff',
author='Simon Schaefer & Dorian Henning',
author_email='[email protected]',
Expand Down

0 comments on commit 5d1ef2a

Please sign in to comment.