Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms/sugar-toolkit/0024-Add-support-for-using-high-contrast-GTK-Sugar-theme.patch
blob: 61c43b62a4fd3765ba126095d7038125a4c8269a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 5b2867cf922780fa883145e0d883837b11fa19f4 Mon Sep 17 00:00:00 2001
From: Plan Ceibal <comunidad@plan.ceibal.edu.uy>
Date: Mon, 1 Nov 2010 18:39:05 +0100
Subject: [PATCH sugar-toolkit 24/31] Add support for using high-contrast GTK
 Sugar theme
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>

[added description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
---
 src/sugar/graphics/style.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/sugar/graphics/style.py b/src/sugar/graphics/style.py
index 7f48d9a..f081bb7 100644
--- a/src/sugar/graphics/style.py
+++ b/src/sugar/graphics/style.py
@@ -1,4 +1,5 @@
 # Copyright (C) 2007, Red Hat, Inc.
+# Copyright (C) 2010, Plan Ceibal <comunidad@plan.ceibal.edu.uy>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -116,6 +117,7 @@ LARGE_ICON_SIZE = zoom(55 * 2.0)
 XLARGE_ICON_SIZE = zoom(55 * 2.75)
 
 client = gconf.client_get_default()
+THEME = client.get_string('/desktop/sugar/interface/gtk_theme')
 FONT_SIZE = client.get_float('/desktop/sugar/font/default_size')
 FONT_FACE = client.get_string('/desktop/sugar/font/default_face')
 
@@ -141,6 +143,12 @@ COLOR_INACTIVE_FILL = Color('#9D9FA1')
 COLOR_INACTIVE_STROKE = Color('#757575')
 COLOR_TEXT_FIELD_GREY = Color('#E5E5E5')
 COLOR_HIGHLIGHT = Color('#E7E7E7')
+if (THEME == 'sugar-contrast'):
+    COLOR_DESKTOP_ICON = Color('#000033')
+    COLOR_BG_CP = Color('#000033')
+else:
+    COLOR_DESKTOP_ICON = Color('#808080')
+    COLOR_BG_CP = Color('#FFFFFF')
 
 PALETTE_CURSOR_DISTANCE = zoom(10)
 
-- 
1.7.6