[hyena] [Hyena.Gui.Canvas] Fix TextBlock's colors (bgo#635596)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] [Hyena.Gui.Canvas] Fix TextBlock's colors (bgo#635596)
- Date: Wed, 24 Nov 2010 17:42:48 +0000 (UTC)
commit 1e396ac90b2ac55cf8cf985a5bbd4f33efe4cc9f
Author: Gabriel Burt <gabriel burt gmail com>
Date: Wed Nov 24 11:39:47 2010 -0600
[Hyena.Gui.Canvas] Fix TextBlock's colors (bgo#635596)
Get the foreground color from the widget and the state
Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs b/Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs
index d9f81f7..af1a0c6 100644
--- a/Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs
+++ b/Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs
@@ -29,6 +29,7 @@ using System.Linq;
using Cairo;
using Hyena.Gui;
+using Hyena.Gui.Theming;
namespace Hyena.Gui.Canvas
{
@@ -193,12 +194,16 @@ namespace Hyena.Gui.Canvas
text_alloc = new_alloc;
}
- protected override void ClippedRender (Context cr)
+ protected override void ClippedRender (Hyena.Data.Gui.CellContext context)
{
+ var cr = context.Context;
if (!EnsureLayout ()) {
return;
}
+ Foreground = new Brush (context.Theme.Colors.GetWidgetColor (
+ context.TextAsForeground ? GtkColorClass.Foreground : GtkColorClass.Text, context.State));
+
Brush foreground = Foreground;
if (!foreground.IsValid) {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]