From 19b58b209880db15d0988542056e37283fc487ff Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Sat, 11 Oct 2008 05:15:35 +0000 Subject: [PATCH] use theme for sidebar colors --- ChangeLog | 1 + deluge/ui/gtkui/filtertreeview.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53658d0b4..da95a21c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ Deluge 1.1.0 - "" (In Development) * Remove dependency on libtorrent for add torrent dialog * Allow adding multiple trackers at once in the edit tracker dialog * Implement #28 Create Torrent Dialog + * Redesiged sidebar with filters for Active and Tracker (see FilterManager) WebUi * All details tabs have the same features as gtk-ui. diff --git a/deluge/ui/gtkui/filtertreeview.py b/deluge/ui/gtkui/filtertreeview.py index 7a513f8b0..7dc9ddaf4 100644 --- a/deluge/ui/gtkui/filtertreeview.py +++ b/deluge/ui/gtkui/filtertreeview.py @@ -123,6 +123,11 @@ class FilterTreeView(component.Component): self.hpaned.set_position(170) 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: self.cat_nodes["state"] = self.treestore.append(None, ["cat", "state", _("State"), 0, None, False]) self.update_row("state", "All" , 0) @@ -195,13 +200,13 @@ class FilterTreeView(component.Component): else: self.renderpix.set_property("visible", False) - cell.set_property('editable', False) + #cell.set_property('editable', False) if cat == "cat": txt = label - col = gtk.gdk.color_parse('#EEEEEE') + col = self.color_insensitive else: txt = "%s (%s)" % (label, count) - col = gtk.gdk.color_parse('white') + col = self.color_sensitive cell.set_property('text', txt) cell.set_property("cell-background-gdk",col)