[kupfer] ui: Make the result list a slight bit transparent at 93% opacity



commit 4c5986c5bfe32cd7c74e7a5976e9a251d7ccfa46
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Mon Mar 21 15:22:40 2011 +0100

    ui: Make the result list a slight bit transparent at 93% opacity

 Documentation/GTKTheming.rst |    4 ++++
 kupfer/plugin/darkstyle.py   |    1 +
 kupfer/ui/browser.py         |    7 +++++++
 3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/Documentation/GTKTheming.rst b/Documentation/GTKTheming.rst
index 8f7565c..5dda4cd 100644
--- a/Documentation/GTKTheming.rst
+++ b/Documentation/GTKTheming.rst
@@ -67,6 +67,10 @@ The following example style includes inline comments::
         MatchView :: corner-radius = 15
         MatchView :: opacity = 70
 
+        ## The Search controls the result list
+
+        Search :: list-opacity = 93
+
         ## The KupferWindow is the whole main window
         KupferWindow :: corner-radius = 15
         KupferWindow :: opacity = 80
diff --git a/kupfer/plugin/darkstyle.py b/kupfer/plugin/darkstyle.py
index d90081a..b53566e 100644
--- a/kupfer/plugin/darkstyle.py
+++ b/kupfer/plugin/darkstyle.py
@@ -52,6 +52,7 @@ style "dark"
 ## default values. These can all be overidden in the theme.
 ## MatchView :: corner-radius = 15
 ## MatchView :: opacity = 70
+## Search :: list-opacity = 93
 ## KupferWindow :: corner-radius = 15
 ## KupferWindow :: opacity = 80
 ## KupferWindow :: decorated = 0
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index 68e7d67..583a278 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -624,6 +624,8 @@ class Search (gtk.Bin):
 		win = self.get_toplevel()
 		self.list_window.set_transient_for(win)
 		self.list_window.set_property("focus-on-map", False)
+		opacity = 0.01*self.style_get_property('list-opacity')
+		self.list_window.set_opacity(opacity)
 		self.list_window.show()
 		self._old_win_position = pos_x, pos_y
 
@@ -816,6 +818,11 @@ gobject.signal_new("activate", Search, gobject.SIGNAL_RUN_LAST,
 		gobject.TYPE_BOOLEAN, (gobject.TYPE_PYOBJECT, ))
 gobject.signal_new("cursor-changed", Search, gobject.SIGNAL_RUN_LAST,
 		gobject.TYPE_BOOLEAN, (gobject.TYPE_PYOBJECT, ))
+gtk.widget_class_install_style_property(Search,
+		('list-opacity', gobject.TYPE_INT, 'Result list opacity',
+		 'Opacity of the whole result list',
+		 50, 100, 93,
+		 gobject.PARAM_READABLE))
 
 class LeafSearch (Search):
 	"""



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]