commit c599d1faca5a66c34a26b7bf5231844e80fb81b7 Author: Kamran Riaz Khan krkhan@inspirated.com Date: Sun Jul 10 19:47:46 2011 +0500
Use gtk theme colors for bandwidth graphs. --- src/gui/graphing/graphStats.py | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/gui/graphing/graphStats.py b/src/gui/graphing/graphStats.py index 0d9ac5f..51150f8 100644 --- a/src/gui/graphing/graphStats.py +++ b/src/gui/graphing/graphStats.py @@ -62,10 +62,14 @@ class GraphStats(TorCtl.PostEventListener):
series = CaGraphSeriesArea(graph, 0, 1)
- line_colors = {'primary' : (1.0, 0.0, 1.0, 1.0), 'secondary' : (0.0, 1.0, 0.0, 1.0)} - fill_colors = {'primary' : (1.0, 0.0, 1.0, 0.3), 'secondary' : (0.0, 1.0, 0.0, 0.3)} - series.style.line_color = line_colors[name] - series.style.fill_color = fill_colors[name] + primaryColor = placeholder.style.fg[gtk.STATE_NORMAL] + secondaryColor = placeholder.style.fg[gtk.STATE_INSENSITIVE] + colors = { 'primary' : (primaryColor.red_float, primaryColor.green_float, primaryColor.blue_float, 0.5), + 'secondary' : (secondaryColor.red_float, secondaryColor.green_float, secondaryColor.blue_float, 0.7) } + + series.style.point_radius = 0.0 + series.style.line_color = colors[name] + series.style.fill_color = colors[name]
graph.seriess.append(series) graph.grid = CaGraphGrid(graph, 0, 1)