Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/338'
Browse files Browse the repository at this point in the history
* origin/pr/338:
  Fix log_dialog
  Enforce using int sizes in global settings
  • Loading branch information
marmarek committed Feb 17, 2023
2 parents a79b3d1 + 325a9e6 commit 2823b2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions qubesmanager/global_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ def __init_ux(self):
# The magical constants of 60 here are derived from margins set
# in the .ui file
req_width = self.scrollAreaWidgetContents_2.sizeHint().width() + 60
avail_width = self.app.desktop().availableGeometry().width() * 0.95
avail_width = int(self.app.desktop().availableGeometry().width() * 0.95)

req_height = self.scrollAreaWidgetContents_2.sizeHint().height() + 60
avail_height = self.app.desktop().availableGeometry().height() * 0.95
avail_height = int(
self.app.desktop().availableGeometry().height() * 0.95)

self.resize(min(req_width, avail_width), min(req_height, avail_height))

Expand Down
2 changes: 1 addition & 1 deletion qubesmanager/log_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init_log_text__(self):
button = QtWidgets.QPushButton(log_path)
button.clicked.connect(partial(self.set_current_log, log_path))
self.buttonsLayout.addWidget(button,
count / btns_in_row, count % btns_in_row)
count // btns_in_row, count % btns_in_row)
count += 1

self.buttonsLayout.itemAt(0).widget().click()
Expand Down

0 comments on commit 2823b2c

Please sign in to comment.