Title: [commits] (jeffrey) [15950] [APP] Tweak column header.
Revision
15950
Author
jeffrey
Date
2007-11-28 23:37:43 -0800 (Wed, 28 Nov 2007)

Log Message

[APP] Tweak column header.

Modified Paths

Diff

Modified: branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar.py (15949 => 15950)

--- branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar.py	2007-11-29 07:06:31 UTC (rev 15949)
+++ branches/rearchitecture/Chandler-Platform/ocap/wxui/calendar.py	2007-11-29 07:37:43 UTC (rev 15950)
@@ -706,6 +706,7 @@
         super(CalendarPanel, self).__init__(parent, -1, style=wx.NO_BORDER)
         self.Bind(wx.EVT_SIZE, self.OnSize)
         
+        bg_color = self.GetBackgroundColour()
         self.SetBackgroundColour(wx.WHITE)
 
         self.prevButton = BitmapButton(self, "CalBackArrow")
@@ -718,6 +719,8 @@
 
         splitterStyle = wx.SP_LIVE_UPDATE | wx.NO_BORDER | wx.SP_3DSASH
         splitter = wx.SplitterWindow(self, style=splitterStyle)
+        # on the Mac, the splitter would inherit the panel's white background
+        splitter.SetBackgroundColour(bg_color)
 
         self.calendar = Calendar(parent=splitter, time_formatter=None)
         self.allday = AllDayCalendar(parent=splitter, time_formatter=None)
@@ -756,12 +759,17 @@
         weekColumnHeader.SetAttribute(colheader.CH_ATTR_VisibleSelection, True)
         self.weekColumnHeader.SetSelectedItem(0)
         self.margin_right = wx.SystemSettings_GetMetric(wx.SYS_VSCROLL_X)
+        self.margin_left = MARGIN_LEFT
+        if wx.Platform == "__WXMSW__":
+            self.margin_left += 1
+        elif wx.Platform == "__WXMAC__":
+            self.margin_right += 1
         self.ResizeHeader()
 
     def ResizeHeader(self):
         self.weekColumnHeader.Freeze()
-        widths = [MARGIN_LEFT + 1, self.margin_right]
-        inner_width = self.GetSize()[0] - sum(widths)
+        widths = [self.margin_left, self.margin_right]
+        inner_width = self.GetSize()[0] - int(sum(widths))
         widths[1:1] = [inner_width/7] * 7
         remainder = inner_width % 7
         # evenly distribute remainder




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

Reply via email to