[banshee/stable-1.6] [Theme] expose a TextMidColor property
- From: Aaron Bockover <abock src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [banshee/stable-1.6] [Theme] expose a TextMidColor property
- Date: Sun,  2 May 2010 21:31:34 +0000 (UTC)
commit 22654022a1c6f26f4396631d7aed2a9f8191ba39
Author: Aaron Bockover <abockover novell com>
Date:   Sun May 2 16:19:59 2010 -0400
    [Theme] 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/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs b/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs
index 05012d7..fc6b076 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/Theme.cs
+++ b/src/Libraries/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]