AGW Logo

svn SVN Revision 70555 For gradientbutton

This file contains the SVN revision history for gradientbutton, at revision 70555.

Available information include commit date, the name of the committer, the file size, the SVN log messages and a diff from the previous version (if available).


file_info File Information

  • Commit Date: 17-Oct-2008 19:15:31 UTC
  • Committer: AG
  • File Size: 20173 byte(s)

svn_log Log Messages

The following log message was entered by the committer:

  • GradientButton: applied patch from Werner and cleaned up a bit the useless parts of the code;
  • AuiToolBar/AuiDefaultDockArt: applied patch from Werner for default colour settings for AUI toolbars;
  • UltimateListCtrl: Fixed bug #13938. Also, don’t throw an error on key down if the list is empty.

svn_diff Diff To Previous Version (68881)

Version SVN diff:

--- wxPython/3rdParty/AGW/agw/gradientbutton.py     2011/08/25 16:40:17     68881
+++ wxPython/3rdParty/AGW/agw/gradientbutton.py     2012/02/09 20:52:26     70555
@@ -2,7 +2,7 @@
# GRADIENTBUTTON wxPython IMPLEMENTATION
#
# Andrea Gavana, @ 07 October 2008
-# Latest Revision: 17 Aug 2011, 15.00 GMT
+# Latest Revision: 09 Feb 2012, 21.00 GMT
#
#
# TODO List
@@ -108,7 +108,7 @@

L{GradientButton} is distributed under the wxPython license.

-Latest Revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT
+Latest Revision: Andrea Gavana @ 09 Feb 2012, 21.00 GMT

Version 0.3

@@ -198,8 +198,17 @@
self.InheritAttributes()
self.SetInitialSize(size)

-        # The following defaults are better suited to draw the text outline
-        self._bottomStartColour = wx.BLACK
+        self.SetBaseColours()
+
+
+    def SetBaseColours(self, startcolour=wx.BLACK, foregroundcolour=wx.WHITE):
+        """Sets the bottom, top, pressed and foreground colour
+
+        :param startcolour: based colour to be used for bottom, top and pressed
+        :param foregroundcolour: colour used for the text
+
+        """
+        self._bottomStartColour = startcolour
rgba = self._bottomStartColour.Red(), self._bottomStartColour.Green(), \
self._bottomStartColour.Blue(), self._bottomStartColour.Alpha()
self._bottomEndColour = self.LightColour(self._bottomStartColour, 20)
@@ -207,14 +216,8 @@
self._topEndColour = self.LightColour(self._bottomStartColour, 25)
self._pressedTopColour = self.LightColour(self._bottomStartColour, 20)
self._pressedBottomColour = wx.Colour(*rgba)
-        self.SetForegroundColour(wx.WHITE)
+        self.SetForegroundColour(foregroundcolour)

-        for method in dir(self):
-            if method.endswith("Colour"):
-                newMethod = method[0:-6] + "Colour"
-                if not hasattr(self, newMethod):
-                    setattr(self, newMethod, method)
-

def LightColour(self, colour, percent):
"""
Tree

Table Of Contents

Previous topic

SVN Revision 68881 For gradientbutton

Next topic

hyperlink