On Saturday, April 02, 2011 05:08:39 am Ed Leafe wrote:
> dabo Commit
> Revision 6521
> Date: 2011-04-02 05:08:39 -0700 (Sat, 02 Apr 2011)
> Author: Ed
> Trac: http://trac.dabodev.com/changeset/6521
> 
> Changed:
> U   trunk/ide/ClassDesignerComponents.py
> 
> Log:
> Replaced the painted border with a dBox. I prefer the look of the painted
> border, but it flickers way too much due to the excessive number of
> repaints. This is a compromise between aesthetics and performance.
> 
> Diff:
> Modified: trunk/ide/ClassDesignerComponents.py
> ===================================================================
> --- trunk/ide/ClassDesignerComponents.py      2011-04-02 11:20:03 UTC (rev 
> 6520)
> +++ trunk/ide/ClassDesignerComponents.py      2011-04-02 12:08:39 UTC (rev 
6521)
> @@ -517,8 +517,9 @@
>                       self.BackColor = "azure"
>               self._selected = False
>               self.Selected = False
> -             self.BorderLineStyle = "Dot"
> -             self.BorderWidth = 1
> +#            self.BorderLineStyle = "Dot"
> +#            self.BorderWidth = 1
> +             self._borderBox = LayoutBorderBox(self)
>               # Make sure the panel allows full resizing
>               self.AlwaysResetSizer = True
>               # Windows has a problem with auto-clearing
> @@ -996,6 +997,46 @@
> 
> 
> 
> +class LayoutBorderBox(dabo.ui.dBox):
> +     """Class used to visually separate LayoutPanels."""
> +     def afterInit(self):
> +             parent = self.Parent
> +             self.buffer = 5
> +             self.Left = parent.Left + self.buffer
> +             self.Top = parent.Top + self.buffer
> +             self.sizeToParent()
> +             parent.bindEvent(dEvents.Resize, self.onParentResize)
> +
> +
> +     def onParentResize(self, evt):
> +             self.sizeToParent()
> +
> +
> +     def sizeToParent(self):
> +             parent = self.Parent
> +             self.Width = parent.Width - (self.buffer * 2)
> +             self.Height = parent.Height - (self.buffer * 2)
> +
> +
> +     # The following methods pass through mouse interaction
> +     # to the parent LayoutPanel.
> +     def onMouseLeftUp(self, evt):
> +             self.Parent.onMouseLeftUp(evt)
> +
> +
> +     def onMouseLeftDown(self, evt):
> +             self.Parent.onMouseLeftDown(evt)
> +
> +
> +     def onSelect(self, evt):
> +             self.Parent.onSelect(evt)
> +
> +
> +     def onContextMenu(self, evt):
> +             self.Parent.onContextMenu(evt)
> +
> +
> +
>  class LayoutSizerMixin(LayoutSaverMixin):
>       def __init__(self, *args, **kwargs):
>               self.isDesignerSizer = True

This change fixed my flashing ClassDesinger on openSUSE 11.4 , python 2.7, 
wxPython 2.8.11

Thanks
Johnf

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to