[iagno] Add theme color property for scoreboard's mark



commit a2c749b767441cc692466f17dbe6344534840de2
Author: iulianR <iulian radu67 gmail com>
Date:   Mon Feb 16 17:05:57 2015 +0200

    Add theme color property for scoreboard's mark

 data/themes/adwaita.theme.in       |    6 ++++++
 data/themes/classic.theme.in       |    6 ++++++
 data/themes/high_contrast.theme.in |    6 ++++++
 data/themes/sun_and_star.theme.in  |    6 ++++++
 src/game-view.vala                 |   14 ++++++++++++--
 5 files changed, 36 insertions(+), 2 deletions(-)
---
diff --git a/data/themes/adwaita.theme.in b/data/themes/adwaita.theme.in
index d6e463a..3bbf548 100644
--- a/data/themes/adwaita.theme.in
+++ b/data/themes/adwaita.theme.in
@@ -12,6 +12,12 @@ Red=0.2
 Green=0.4
 Blue=0.6
 
+[Mark]
+Red=0.2
+Green=0.4
+Blue=0.6
+Width=2
+
 [Border]
 Red=0.1
 Green=0.1
diff --git a/data/themes/classic.theme.in b/data/themes/classic.theme.in
index b1bb63a..9e9466b 100644
--- a/data/themes/classic.theme.in
+++ b/data/themes/classic.theme.in
@@ -12,6 +12,12 @@ Red=0.2
 Green=0.6
 Blue=0.4
 
+[Mark]
+Red=0.5
+Green=0.5
+Blue=0.5
+Width=2
+
 [Border]
 Red=0.1
 Green=0.1
diff --git a/data/themes/high_contrast.theme.in b/data/themes/high_contrast.theme.in
index 30be6cc..0fb21e3 100644
--- a/data/themes/high_contrast.theme.in
+++ b/data/themes/high_contrast.theme.in
@@ -12,6 +12,12 @@ Red=1.0
 Green=1.0
 Blue=1.0
 
+[Mark]
+Red=0.0
+Green=0.0
+Blue=0.0
+Width=3
+
 [Border]
 Red=0.0
 Green=0.0
diff --git a/data/themes/sun_and_star.theme.in b/data/themes/sun_and_star.theme.in
index 17f02d6..57dec45 100644
--- a/data/themes/sun_and_star.theme.in
+++ b/data/themes/sun_and_star.theme.in
@@ -12,6 +12,12 @@ Red=0.2
 Green=0.6
 Blue=0.4
 
+[Mark]
+Red=0.2
+Green=0.6
+Blue=0.4
+Width=2
+
 [Border]
 Red=0.1
 Green=0.1
diff --git a/src/game-view.vala b/src/game-view.vala
index 39080e4..34a359e 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -37,6 +37,11 @@ public class GameView : Gtk.DrawingArea
     private double background_green = 0.6;
     private double background_blue = 0.4;
 
+    private double mark_red = 0.2;
+    private double mark_green = 0.6;
+    private double mark_blue = 0.4;
+    private int mark_width = 2;
+
     private double border_red = 0.1;
     private double border_green = 0.1;
     private double border_blue = 0.1;
@@ -170,6 +175,11 @@ public class GameView : Gtk.DrawingArea
             background_green = key.get_double  ("Background", "Green");
             background_blue  = key.get_double  ("Background", "Blue");
 
+            mark_red         = key.get_double  ("Mark", "Red");
+            mark_green       = key.get_double  ("Mark", "Green");
+            mark_blue        = key.get_double  ("Mark", "Blue");
+            mark_width       = key.get_integer ("Mark", "Width");
+
             border_red       = key.get_double  ("Border", "Red");
             border_green     = key.get_double  ("Border", "Green");
             border_blue      = key.get_double  ("Border", "Blue");
@@ -436,8 +446,8 @@ public class GameView : Gtk.DrawingArea
 
         cr.save ();
 
-        cr.set_source_rgba (spacing_red, spacing_green, spacing_blue, 1.0);
-        cr.set_line_width (spacing_width);
+        cr.set_source_rgba (mark_red, mark_green, mark_blue, 1.0);
+        cr.set_line_width (mark_width);
 
         cr.translate (0, current_player_number * height / 2.0);
         cr.move_to (height / 4.0, height / 8.0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]