[caribou] make sure min/max alpha are sane
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] make sure min/max alpha are sane
- Date: Thu, 5 May 2011 19:44:12 +0000 (UTC)
commit bc2274c3b473c1015500eb252cdbf73bed733e0e
Author: Eitan Isaacson <eitan monotonous org>
Date: Wed May 4 13:25:01 2011 -0700
make sure min/max alpha are sane
caribou/antler/window.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/caribou/antler/window.py b/caribou/antler/window.py
index 78f7b6a..83feb3e 100644
--- a/caribou/antler/window.py
+++ b/caribou/antler/window.py
@@ -54,6 +54,8 @@ class ProximityWindowBase(object):
self.max_distance = value
def _set_min_max_alpha(self, min_alpha, max_alpha):
+ if min_alpha > max_alpha:
+ min_alpha = max_alpha
self.max_alpha = max_alpha
self.min_alpha = min_alpha
if self.max_alpha != self.min_alpha:
@@ -72,7 +74,7 @@ class ProximityWindowBase(object):
self._set_min_max_alpha(value, max_alpha.value)
def _on_max_alpha_changed(self, setting, value, min_alpha):
- self._set_min_max_alpha(max_alpha.value, value)
+ self._set_min_max_alpha(min_alpha.value, value)
def _proximity_check(self):
px, py = self.get_pointer()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]