[ease/themes: 25/25] [themes] Support background colors in themes.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease/themes: 25/25] [themes] Support background colors in themes.
- Date: Wed, 21 Jul 2010 20:51:12 +0000 (UTC)
commit 925b5c6bc39e43fa4f1a1e1594188c18dbe8a907
Author: Nate Stedman <natesm gmail com>
Date: Wed Jul 21 16:21:53 2010 -0400
[themes] Support background colors in themes.
src/ease-theme.vala | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/ease-theme.vala b/src/ease-theme.vala
index e421346..639103e 100644
--- a/src/ease-theme.vala
+++ b/src/ease-theme.vala
@@ -40,6 +40,9 @@ public class Ease.Theme : GLib.Object
public const string MEDIA = "media";
public const string MEDIA_HEADER = "media-header";
+ // master slide properties
+ public const string BACKGROUND_COLOR = "background-color";
+
// text content types
private const string TITLE_TEXT = "title-text";
private const string AUTHOR_TEXT = "author-text";
@@ -240,6 +243,11 @@ public class Ease.Theme : GLib.Object
{
Slide slide = new Slide();
+ // set the slide background property
+ Clutter.Color color = {255, 255, 255, 255};
+ color.from_string(master_get(master, BACKGROUND_COLOR));
+ slide.background_color = color;
+
switch (master)
{
case TITLE:
@@ -394,11 +402,15 @@ public class Ease.Theme : GLib.Object
private string master_get(string master, string prop)
{
// try local specifics
- var str = masters.get(master).get(prop);
- if (str != null) return str;
+ var map = masters.get(master);
+ if (map != null)
+ {
+ var str = map.get(prop);
+ if (str != null) return str;
+ }
// try local generics
- str = master_defaults.get(prop);
+ var str = master_defaults.get(prop);
if (str != null) return str;
// use default settings
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]