[hyena] ColumnCellRating: Follow GTK theme colors when selected
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] ColumnCellRating: Follow GTK theme colors when selected
- Date: Mon, 23 Jun 2014 14:13:47 +0000 (UTC)
commit 630e1b803046b2bc1d4fcaef70d4f0c31d883656
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Mon Jun 23 16:07:34 2014 +0200
ColumnCellRating: Follow GTK theme colors when selected
Merge the cell state into the overall widget state before selecting the
color to use for rendering.
Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs b/Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs
index f08771d..77bd297 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs
@@ -63,8 +63,11 @@ namespace Hyena.Data.Gui
renderer.Value = Value;
bool is_hovering = hover_bound == BoundObjectParent && hover_bound != null;
- renderer.Render (context.Context, area, CairoExtensions.GdkRGBAToCairoColor
(context.StyleContext.GetColor (context.State)),
- is_hovering, is_hovering, hover_value, 0.8, 0.45, 0.35);
+ context.StyleContext.Save ();
+ context.StyleContext.State |= context.State;
+ Cairo.Color color = CairoExtensions.GdkRGBAToCairoColor (context.StyleContext.GetColor
(context.StyleContext.State));
+ renderer.Render (context.Context, area, color, is_hovering, is_hovering, hover_value, 0.8, 0.45,
0.35);
+ context.StyleContext.Restore ();
// FIXME: Something is hosed in the view when computing cell dimensions
// The cell width request is always smaller than the actual cell, so
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]