deskbar-applet r2529 - in trunk: . deskbar/ui



Author: sebp
Date: Wed Jan 21 18:44:07 2009
New Revision: 2529
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2529&view=rev

Log:
Fixed bug #542861: Deskbar applet has a pixel border when placed at the edge of the screen

Modified:
   trunk/ChangeLog
   trunk/deskbar/ui/DeskbarApplet.py

Modified: trunk/deskbar/ui/DeskbarApplet.py
==============================================================================
--- trunk/deskbar/ui/DeskbarApplet.py	(original)
+++ trunk/deskbar/ui/DeskbarApplet.py	Wed Jan 21 18:44:07 2009
@@ -153,6 +153,9 @@
         self.applet.add(self.tray)
         self.tray.show()
         
+        self.__style_applied = False
+        self.force_no_focus_applet()
+        
         self.setup_menu()
         self._setup_mvc()
         
@@ -162,6 +165,20 @@
         
         self.applet.show_all()
 
+    def force_no_focus_applet(self):
+        # Fixes bug #542861: Deskbar applet has a pixel border
+        if not self.__style_applied:
+            gtk.rc_parse_string ("""
+               style \"deskbar-applet-button-style\"
+               {
+                 GtkWidget::focus-line-width = 0
+                 GtkWidget::focus-padding = 0
+               }
+               widget \"*.deskbar-applet-button\" style \"deskbar-applet-button-style\"
+               """)
+            self.__style_applied = False
+        self.applet.set_name("deskbar-applet-button")
+
     def _setup_history(self):
         self.hview = CuemiacHistoryView(self._core.get_history())
         self.hview.connect("match-selected", self.__on_history_match_selected)



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