Skip to content

Commit

Permalink
Explicitly set contentsMargins to 11 px on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
crwood committed Oct 4, 2018
1 parent ff4288c commit cc74c75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gridsync/gui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ def add_folders_view(self, gateway):
view = View(self.gui, gateway)
widget = QWidget()
layout = QGridLayout(widget)
left, top, right, _ = layout.getContentsMargins()
if sys.platform == 'darwin':
layout.setContentsMargins(left, top, right, 0)
# XXX: For some reason, getContentsMargins returns 20 px on macOS..
layout.setContentsMargins(11, 11, 11, 0)
else:
left, _, right, _ = layout.getContentsMargins()
layout.setContentsMargins(left, 0, right, 0)
layout.addWidget(view)
layout.addWidget(StatusPanel(gateway))
Expand Down

0 comments on commit cc74c75

Please sign in to comment.