Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #189 cocoa.progressbar with rehint #193

Merged
merged 1 commit into from Jul 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/cocoa/toga_cocoa/widgets/progressbar.py
Expand Up @@ -16,6 +16,7 @@ def create(self):

# Add the layout constraints
self._add_constraints()
self.rehint()

def _set_value(self, value):
if value is not None:
Expand All @@ -37,3 +38,9 @@ def _set_max(self, value):
self._impl.setMaxValue_(value)
else:
self._impl.setIndeterminate_(True)

def rehint(self):
self.style.hint(
height=self._impl.fittingSize().height,
width=self._impl.fittingSize().width
)