OSDN Git Service

Selected text colors are fixed in ThreadView.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 3 May 2009 10:49:00 +0000 (19:49 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 3 May 2009 10:49:00 +0000 (19:49 +0900)
src/FukuiNoNamari/thread_view.py

index 006fad4..c07dc26 100644 (file)
@@ -218,16 +218,16 @@ class ElementText:
     def draw(self, drawingarea, y_offset, pango_layout,
              selection=False, start_index=0, end_index=0xffffff):
 
-        selection_fg = drawingarea.style.text[1]
-        selection_bg = drawingarea.style.base[1]
+        selection_fg = drawingarea.style.text[gtk.STATE_SELECTED]
+        selection_bg = drawingarea.style.base[gtk.STATE_SELECTED]
 
         for line in self.line_list:
 
             text = self.text[line.start_index:line.end_index]
             u_text = text.encode("utf8")
             gc = drawingarea.window.new_gc()
-            gc.set_foreground(drawingarea.style.text[0])
-            gc.set_background(drawingarea.style.base[0])
+            gc.set_foreground(drawingarea.style.text[gtk.STATE_NORMAL])
+            gc.set_background(drawingarea.style.base[gtk.STATE_NORMAL])
             attrs = self._get_attrs()
             if selection: