[banshee] [SourceRowRenderer] use Cairo to render counts
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [SourceRowRenderer] use Cairo to render counts
- Date: Wed, 5 May 2010 20:05:41 +0000 (UTC)
commit 02c37c0321f148eb220bfa5b65c8742ba4b4a3dd
Author: Aaron Bockover <abockover novell com>
Date: Sun May 2 16:17:46 2010 -0400
[SourceRowRenderer] use Cairo to render counts
Pull the count color from the Hyena GUI theme.
.../Banshee.Sources.Gui/SourceRowRenderer.cs | 22 ++++++++-----------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
index c578c36..ea4696c 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
@@ -32,6 +32,7 @@ using Gtk;
using Gdk;
using Pango;
+using Hyena.Gui;
using Hyena.Gui.Theming;
using Hyena.Gui.Theatrics;
@@ -225,22 +226,17 @@ namespace Banshee.Sources.Gui
return;
}
- Gdk.GC mod_gc = widget.Style.TextGC (state);
- if (state == StateType.Normal || (view != null && state == StateType.Prelight)) {
- Gdk.Color fgcolor = widget.Style.Base (state);
- Gdk.Color bgcolor = widget.Style.Text (state);
+ if (view != null && view.Cr != null) {
+ view.Cr.Color = state == StateType.Normal || (view != null && state == StateType.Prelight)
+ ? view.Theme.TextMidColor
+ : view.Theme.Colors.GetWidgetColor (GtkColorClass.Text, state);
- mod_gc = new Gdk.GC (drawable);
- mod_gc.Copy (widget.Style.TextGC (state));
- mod_gc.RgbFgColor = Hyena.Gui.GtkUtilities.ColorBlend (fgcolor, bgcolor);
- mod_gc.RgbBgColor = fgcolor;
+ view.Cr.MoveTo (
+ cell_area.X + cell_area.Width - count_layout_width - 2,
+ cell_area.Y + 0.5 + (double)(cell_area.Height - count_layout_height) / 2.0);
+ PangoCairoHelper.ShowLayout (view.Cr, count_layout);
}
- drawable.DrawLayout (mod_gc,
- cell_area.X + cell_area.Width - count_layout_width - 2,
- Middle (cell_area, count_layout_height),
- count_layout);
-
count_layout.Dispose ();
fd.Dispose ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]