[hyena/gtk3] [gtk3] Fix more style warning
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena/gtk3] [gtk3] Fix more style warning
- Date: Mon, 9 May 2011 19:50:52 +0000 (UTC)
commit 86154b4b1c0c2cf15f350a76804457ca97adb3f0
Author: Olivier Dufour <olivier duff gmail com>
Date: Tue May 3 13:30:00 2011 +0200
[gtk3] Fix more style warning
Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs | 2 +-
Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs | 2 +-
.../Hyena.Data.Gui/ListView/ListView_Header.cs | 16 ++++++++++------
.../Hyena.Data.Gui/ListView/ListView_Rendering.cs | 4 ++--
4 files changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs b/Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs
index 0346389..96a1c9c 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ColumnCellRating.cs
@@ -63,7 +63,7 @@ namespace Hyena.Data.Gui
renderer.Value = Value;
bool is_hovering = hover_bound == BoundObjectParent && hover_bound != null;
- renderer.Render (context.Context, area, context.Theme.Colors.GetWidgetColor (GtkColorClass.Text, context.State),
+ renderer.Render (context.Context, area, context.Theme.Colors.GetWidgetColor (GtkColorClass.Foreground, context.State),
is_hovering, is_hovering, hover_value, 0.8, 0.45, 0.35);
// FIXME: Something is hosed in the view when computing cell dimensions
diff --git a/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs b/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
index 4812a64..0c7538f 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs
@@ -110,7 +110,7 @@ namespace Hyena.Data.Gui
//context.Context.Clip ();
context.Context.MoveTo (Padding.Left, ((int)cellHeight - text_height) / 2);
Cairo.Color color = context.Theme.Colors.GetWidgetColor (
- context.TextAsForeground ? GtkColorClass.Foreground : GtkColorClass.Text, context.State);
+ GtkColorClass.Foreground, context.State);
color.A = Alpha ?? (context.Opaque ? 1.0 : 0.5);
context.Context.Color = color;
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
index bddb01d..a1d1006 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
@@ -579,10 +579,12 @@ namespace Hyena.Data.Gui
Add (label);
}
- protected override void OnStyleSet (Style previousStyle)
+ protected override void OnStyleUpdated ()
{
- base.OnStyleSet (previousStyle);
- label.ModifyFg (StateType.Prelight, Style.Foreground (StateType.Selected));
+ base.OnStyleUpdated ();
+ Gdk.RGBA rgba;
+ StyleContext.GetColor (StateFlags.Selected, rgba);
+ label.OverrideColor (StateFlags.Prelight, rgba);
}
protected override void OnActivated ()
@@ -616,10 +618,12 @@ namespace Hyena.Data.Gui
Add (label);
}
- protected override void OnStyleSet (Style previousStyle)
+ protected override void OnStyleUpdated ()
{
- base.OnStyleSet (previousStyle);
- label.ModifyFg (StateType.Prelight, Style.Foreground (StateType.Selected));
+ base.OnStyleUpdated ();
+ Gdk.RGBA rgba;
+ StyleContext.GetColor (StateFlags.Selected, rgba);
+ label.OverrideColor (StateFlags.Prelight, rgba);
}
protected override void OnActivated ()
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
index 1bac1eb..01b51cc 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
@@ -80,7 +80,7 @@ namespace Hyena.Data.Gui
private bool changing_style = false;
- protected override void OnStyleSet (Style old_style)
+ protected override void OnStyleUpdated ()
{
if (changing_style) {
return;
@@ -90,7 +90,7 @@ namespace Hyena.Data.Gui
GtkUtilities.AdaptGtkRcStyle (this, typeof (TreeView));
changing_style = false;
- base.OnStyleSet (old_style);
+ base.OnStyleUpdated ();
// FIXME: legacy list foo
if (ViewLayout == null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]