Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Refactored view utils for storing view size, state and position
Browse files Browse the repository at this point in the history
@min_best_size and @remember_size_pos are replaced by Mixins. Separated Size from Position, allowing for combining Minimalistic with Position storing, without bothering for previous window sites. Also, maximized window state is now being stored as well.
[completed: 84, 83]
  • Loading branch information
Bouke committed Dec 21, 2012
1 parent 1af705c commit ba024ad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mvvm/viewbinding/display.py
Expand Up @@ -15,15 +15,14 @@ def update_view(self):
self.field.Show(value == self.show_if_value)
self.field.GetParent().GetSizer().Layout()

# resize frame if @min_best_size'd
if hasattr(self.field.TopLevelParent, 'MinBestSize'):
# resize frame if Minimalistic
if hasattr(self.field.TopLevelParent, 'update_minimal_size'):
# First, invalidate all parents
parent = self.field.Parent
while parent:
parent.InvalidateBestSize()
parent = parent.Parent
self.field.TopLevelParent.SetSize(
self.field.TopLevelParent.MinBestSize())
self.field.TopLevelParent.update_minimal_size()


class EnabledBinding(object):
Expand Down

0 comments on commit ba024ad

Please sign in to comment.