[hyena] expose a TextMidColor property
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] expose a TextMidColor property
- Date: Wed, 26 May 2010 02:43:14 +0000 (UTC)
commit dc334c832dc897c9b8ba29f4262bd52fc93d32fb
Author: Aaron Bockover <abockover novell com>
Date: Sun May 2 16:19:59 2010 -0400
expose a TextMidColor property
By default compute this color to be a 50% blend between base background
color and text foreground color. This is the default color used for
source view counts.
src/Hyena.Gui/Hyena.Gui.Theming/Theme.cs | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/Hyena.Gui/Hyena.Gui.Theming/Theme.cs b/src/Hyena.Gui/Hyena.Gui.Theming/Theme.cs
index 05012d7..fc6b076 100644
--- a/src/Hyena.Gui/Hyena.Gui.Theming/Theme.cs
+++ b/src/Hyena.Gui/Hyena.Gui.Theming/Theme.cs
@@ -48,6 +48,8 @@ namespace Hyena.Gui.Theming
private Cairo.Color view_fill;
private Cairo.Color view_fill_transparent;
+ private Cairo.Color text_mid;
+
public GtkColors Colors {
get { return colors; }
}
@@ -76,6 +78,11 @@ namespace Hyena.Gui.Theming
view_fill = colors.GetWidgetColor (GtkColorClass.Base, StateType.Normal);
view_fill_transparent = view_fill;
view_fill_transparent.A = 0;
+
+ text_mid = CairoExtensions.AlphaBlend (
+ colors.GetWidgetColor (GtkColorClass.Base, StateType.Normal),
+ colors.GetWidgetColor (GtkColorClass.Text, StateType.Normal),
+ 0.5);
}
#region Drawing
@@ -199,6 +206,11 @@ namespace Hyena.Gui.Theming
get { return selection_stroke; }
}
+ public Cairo.Color TextMidColor {
+ get { return text_mid; }
+ protected set { text_mid = value; }
+ }
+
public virtual int BorderWidth {
get { return 1; }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]