[gnome-clocks/wip/vala] avoid using red for alarms. reuse named colors from theme
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/wip/vala] avoid using red for alarms. reuse named colors from theme
- Date: Mon, 18 Feb 2013 19:55:22 +0000 (UTC)
commit 269334b471f11082c07127b8ffbab66a8ae2c779
Author: Jakub Steiner <jimmac gmail com>
Date: Mon Feb 18 18:05:41 2013 +0100
avoid using red for alarms. reuse named colors from theme
data/css/gnome-clocks.css | 33 ++++++++++++++++++++++++++-------
src/alarm.vala | 3 ++-
2 files changed, 28 insertions(+), 8 deletions(-)
---
diff --git a/data/css/gnome-clocks.css b/data/css/gnome-clocks.css
index 24a3a1b..8378953 100644
--- a/data/css/gnome-clocks.css
+++ b/data/css/gnome-clocks.css
@@ -12,7 +12,6 @@
.clocks-digital-renderer {
background-color: transparent;
- border-radius: 12px;
}
.clocks-digital-renderer.inner {
@@ -62,7 +61,7 @@
background-image: -gtk-gradient(radial,
center center, 0,
center bottom, 1.0,
- from(rgb(223, 0, 0)), to(rgb(164, 0, 0)));
+ from(shade(@theme_selected_bg_color,1.2)), to(@theme_selected_bg_color));
color: white;
}
@@ -71,31 +70,51 @@
background-image: -gtk-gradient(radial,
center center, 0,
center bottom, 1.0,
- from(rgb(223, 0, 0)), to(shade(rgb(164, 0, 0), 1.1)));
+ from(shade(@theme_selected_bg_color, 1.4)),
to(@theme_selected_bg_color));
+ text-shadow: 0 2px 2px rgba(0,0,0,0.5)
}
-.clocks-digital-renderer.inactive {
+.clocks-digital-renderer.snoozing {
background-color: transparent;
background-image: -gtk-gradient(radial,
center center, 0,
center bottom, 1.0,
- from(rgb(85, 87, 83)), to(rgb(51, 51, 51)));
+ from(@warning_bg_color), to(shade(@warning_bg_color,0.9)));
color: white;
}
+.clocks-digital-renderer.snoozing:prelight {
+ background-color: transparent;
+ background-image: -gtk-gradient(radial,
+ center center, 0,
+ center bottom, 1.0,
+ from(shade(@warning_bg_color,1.1)), to(shade(@warning_bg_color,0.99)));
+ text-shadow: 0 2px 2px rgba(0,0,0,0.5)
+}
+
+.clocks-digital-renderer.inactive {
+ background-color: transparent;
+ background-image: -gtk-gradient(radial,
+ center center, 0,
+ center bottom, 1.0,
+ from(@insensitive_bg_color), to(shade(@insensitive_bg_color,0.9)));
+ color: @insensitive_fg_color;
+}
+
.clocks-digital-renderer.inactive:prelight {
background-color: transparent;
background-image: -gtk-gradient(radial,
center center, 0,
center bottom, 1.0,
- from(rgb(85, 87, 83)), to(shade(rgb(51, 51, 51), 1.2)));
+ from(shade(@insensitive_bg_color,1.1)),
to(shade(@insensitive_bg_color,0.99)));
+ color: shade(@insensitive_fg_color,0.9);
}
.clocks-digital-renderer.active.inner,
+.clocks-digital-renderer.snoozing.inner,
.clocks-digital-renderer.inactive.inner {
background-color: transparent;
background-image: none;
- color: white;
}
.clocks-time-label {
diff --git a/src/alarm.vala b/src/alarm.vala
index 666cb6a..483f992 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -443,11 +443,12 @@ public class MainPanel : Gd.Stack, Clocks.Clock {
if (alarm.state == Item.State.SNOOZING) {
renderer.text = alarm.snooze_time_label;
renderer.subtext = "(%s)".printf(alarm.time_label);
+ renderer.css_class = "snoozing";
} else {
renderer.text = alarm.time_label;
renderer.subtext = alarm.repeat_label;
+ renderer.css_class = alarm.active ? "active" : "inactive";
}
- renderer.css_class = alarm.active ? "active" : "inactive";
});
icon_view.item_activated.connect ((path) => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]