Changeset 4159
- Timestamp:
- 06/18/08 19:47:56 (2 months ago)
- Files:
-
- trunk/dabo/ui/uiwx/dPemMixin.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/ui/uiwx/dPemMixin.py
r4139 r4159 40 40 # Transparency level 41 41 self._transparency = 255 42 42 # Time to change transparency 43 self._transparencyDelay = 0.25 44 43 45 # There are a few controls that don't yet support 3-way inits (grid, for 44 46 # one). These controls will send the wx classref as the preClass argument, … … 459 461 if self._hover: 460 462 if self._hoverTimer: 461 self._hoverTimer.stop() 463 self._hoverTimer.release() 464 self._hoverTimer = None 462 465 self.endHover(evt) 463 466 … … 2479 2482 if self._constructed(): 2480 2483 val = min(max(val, 0), 255) 2481 self._transparency = val 2482 self.SetTransparent(val) 2484 delay = self.TransparencyDelay 2485 if delay: 2486 sleeptime = delay / 10.0 2487 oldVal = self._transparency 2488 self._transparency = val 2489 slice = (val - oldVal) / 10 2490 newVal = oldVal 2491 for i in xrange(10): 2492 newVal = int(round(newVal + slice, 0)) 2493 newVal = min(max(newVal, 0), 255) 2494 self.SetTransparent(newVal) 2495 self.refresh() 2496 time.sleep(sleeptime) 2497 # Make sure that there is no rounding error 2498 self.SetTransparent(val) 2499 else: 2500 self.SetTransparent(val) 2483 2501 else: 2484 2502 self._properties["Transparency"] = val 2503 2504 2505 def _getTransparencyDelay(self): 2506 return self._transparencyDelay 2507 2508 def _setTransparencyDelay(self, val): 2509 if self._constructed(): 2510 self._transparencyDelay = val 2511 else: 2512 self._properties["TransparencyDelay"] = val 2485 2513 2486 2514 … … 2721 2749 Default=0. Does not currently work on Gtk/Linux. (int)""")) 2722 2750 2751 TransparencyDelay = property(_getTransparencyDelay, _setTransparencyDelay, None, 2752 _("""Time in seconds to change transparency. Set it to zero to see instant changes. 2753 Default=0.25 (float)""")) 2754 2723 2755 Visible = property(_getVisible, _setVisible, None, 2724 2756 _("Specifies whether the object is visible at runtime. (bool)") )
