use theme for sidebar colors

This commit is contained in:
Martijn Voncken 2008-10-11 05:15:35 +00:00
parent 20cfb836ff
commit 19b58b2098
2 changed files with 9 additions and 3 deletions

View File

@ -13,6 +13,7 @@ Deluge 1.1.0 - "" (In Development)
* Remove dependency on libtorrent for add torrent dialog * Remove dependency on libtorrent for add torrent dialog
* Allow adding multiple trackers at once in the edit tracker dialog * Allow adding multiple trackers at once in the edit tracker dialog
* Implement #28 Create Torrent Dialog * Implement #28 Create Torrent Dialog
* Redesiged sidebar with filters for Active and Tracker (see FilterManager)
WebUi WebUi
* All details tabs have the same features as gtk-ui. * All details tabs have the same features as gtk-ui.

View File

@ -123,6 +123,11 @@ class FilterTreeView(component.Component):
self.hpaned.set_position(170) self.hpaned.set_position(170)
self.label_view.connect("button-press-event", self.on_button_press_event) self.label_view.connect("button-press-event", self.on_button_press_event)
#colors using current theme.
style = self.window.window.get_style()
self.color_insensitive = style.base[gtk.STATE_INSENSITIVE]
self.color_sensitive = style.base[gtk.STATE_NORMAL]
#initial order of state filter: #initial order of state filter:
self.cat_nodes["state"] = self.treestore.append(None, ["cat", "state", _("State"), 0, None, False]) self.cat_nodes["state"] = self.treestore.append(None, ["cat", "state", _("State"), 0, None, False])
self.update_row("state", "All" , 0) self.update_row("state", "All" , 0)
@ -195,13 +200,13 @@ class FilterTreeView(component.Component):
else: else:
self.renderpix.set_property("visible", False) self.renderpix.set_property("visible", False)
cell.set_property('editable', False) #cell.set_property('editable', False)
if cat == "cat": if cat == "cat":
txt = label txt = label
col = gtk.gdk.color_parse('#EEEEEE') col = self.color_insensitive
else: else:
txt = "%s (%s)" % (label, count) txt = "%s (%s)" % (label, count)
col = gtk.gdk.color_parse('white') col = self.color_sensitive
cell.set_property('text', txt) cell.set_property('text', txt)
cell.set_property("cell-background-gdk",col) cell.set_property("cell-background-gdk",col)