Skip to content

Commit

Permalink
Bug fix with window geometry
Browse files Browse the repository at this point in the history
The first time a user uses the program, some defualts are set for the
size of the window when it appears. There was a bug in the definition,
because QRect expects 4 ints but two ints and two floats were being
passed. This has now fixed that.

Version bump to reflect the change.
  • Loading branch information
tgwoodcock committed Sep 21, 2022
1 parent e5247be commit ce78bc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hdf5view/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.4dev0'
__version__ = '0.0.5dev0'
5 changes: 4 additions & 1 deletion src/hdf5view/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,10 @@ def load_settings(self):
self.restoreGeometry(geometry)
else:
geometry = self.app.desktop().availableGeometry(self)
self.setGeometry(QRect(0, 0, geometry.width() * 0.8, geometry.height() * 0.7))
self.setGeometry(QRect(0,
0,
int(geometry.width() * 0.8),
int(geometry.height() * 0.7)))

# Restore the window state
window_state = settings.value('windowState')
Expand Down

0 comments on commit ce78bc5

Please sign in to comment.