Title: [commits] (jeffrey) [16034] [APP] Work around inaccurate size of minicalendar after sash_update
Revision
16034
Author
jeffrey
Date
2007-12-03 16:42:22 -0800 (Mon, 03 Dec 2007)

Log Message

[APP] Work around inaccurate size of minicalendar after sash_update

Modified Paths

Diff

Modified: branches/rearchitecture/Chandler-App/ocap/chandler/preview.py (16033 => 16034)

--- branches/rearchitecture/Chandler-App/ocap/chandler/preview.py	2007-12-04 00:37:54 UTC (rev 16033)
+++ branches/rearchitecture/Chandler-App/ocap/chandler/preview.py	2007-12-04 00:42:22 UTC (rev 16034)
@@ -128,7 +128,7 @@
 
     @trellis.modifier
     def OnSize(self, event):
-        self.width, self.height = self.GetSize()
+        self.width, self.height = self.GetClientSize()
 
     @trellis.observer
     def refresher(self):

Modified: branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar_canvas.py (16033 => 16034)

--- branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar_canvas.py	2007-12-04 00:37:54 UTC (rev 16033)
+++ branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar_canvas.py	2007-12-04 00:42:22 UTC (rev 16034)
@@ -687,6 +687,8 @@
 
         self.Bind(colheader.EVT_COLUMNHEADER_SELCHANGED,
                   self.OnDayColumnSelect, header)
+        # don't flicker when resizing
+        header.Bind(wx.EVT_ERASE_BACKGROUND, lambda x: None)
 
         # turn this off for now, because our sizing needs to be exact
         header.SetAttribute(colheader.CH_ATTR_ProportionalResizing,False)

Modified: branches/rearchitecture/Chandler-Platform/ocap/wxui/layout.py (16033 => 16034)

--- branches/rearchitecture/Chandler-Platform/ocap/wxui/layout.py	2007-12-04 00:37:54 UTC (rev 16033)
+++ branches/rearchitecture/Chandler-Platform/ocap/wxui/layout.py	2007-12-04 00:42:22 UTC (rev 16034)
@@ -102,8 +102,12 @@
         else:
             return self.Size.width - self.SashSize
         
-    def update_gravity(self, position):        
+    def update_gravity(self, position):
         self.SashGravity = float(position)/self.get_size()
+        # when trellis.on_commit calls, grandchildren's sizes don't update
+        # properly
+        for child in self.GetChildren():
+            child.SetSize(child.Size)
 
     def update_sash(self, gravity):
         pos = self.SashPosition = int(gravity * self.get_size())




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to