[hyena] ColumnCellText: Render text with RenderLayout instead of using Cairo
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] ColumnCellText: Render text with RenderLayout instead of using Cairo
- Date: Thu, 12 Jun 2014 14:59:47 +0000 (UTC)
commit 4f76fab004b053f5219a36ade9df6ff4e99f3bcb
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Sat Jun 7 18:44:34 2014 +0200
ColumnCellText: Render text with RenderLayout instead of using Cairo
This should make the text follow the GTK theme.
Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs b/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
index 27bd4e7..fc18a9f 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
@@ -106,15 +106,8 @@ namespace Hyena.Data.Gui
return;
}
- //context.Context.Rectangle (0, 0, cellWidth, cellHeight);
- //context.Context.Clip ();
- context.Context.MoveTo (Padding.Left, ((int)cellHeight - text_height) / 2);
- var color = CairoExtensions.GdkRGBAToCairoColor (context.Theme.Widget.StyleContext.GetColor
(context.State));
- color.A = Alpha ?? (context.Opaque ? 1.0 : 0.5);
- context.Context.SetSourceColor (color);
-
- Pango.CairoHelper.ShowLayout (context.Context, context.Layout);
- //context.Context.ResetClip ();
+ int y_pos = ((int)cellHeight - text_height) / 2;
+ context.Widget.StyleContext.RenderLayout (context.Context, Padding.Left, y_pos, context.Layout);
}
public void UpdateText (CellContext context, double cellWidth)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]