[gnome-clocks/wip/stopwatchlistbox] Try a different effect for the stopwatch
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/wip/stopwatchlistbox] Try a different effect for the stopwatch
- Date: Tue, 13 Aug 2013 09:12:58 +0000 (UTC)
commit 09b9f9c886021caac05e312ee821696489b4bc4f
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Aug 13 11:12:25 2013 +0200
Try a different effect for the stopwatch
data/css/gnome-clocks.css | 6 +++---
src/stopwatch.vala | 28 ++++++++++++++--------------
2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/data/css/gnome-clocks.css b/data/css/gnome-clocks.css
index 041fc97..5cff3cf 100644
--- a/data/css/gnome-clocks.css
+++ b/data/css/gnome-clocks.css
@@ -190,14 +190,14 @@
}
.clocks-round-frame.trough {
- color: #babdb6;
+ color: #d3d7cf;
}
.clocks-round-frame.progress {
color: #2e3436;
}
-.clocks-round-frame.progress.inverted {
- color: #eeeeec;
+.clocks-round-frame.progress-fast {
+ color: #babdb6;
}
diff --git a/src/stopwatch.vala b/src/stopwatch.vala
index af30e04..27a8532 100644
--- a/src/stopwatch.vala
+++ b/src/stopwatch.vala
@@ -38,28 +38,28 @@ public class AnalogFrame : RoundFrame {
context.save ();
context.add_class ("progress");
+ cr.set_line_width (10);
+ cr.set_line_cap (Cairo.LineCap.ROUND);
+
var color = context.get_color (Gtk.StateFlags.NORMAL);
var progress = ((double) seconds + millisecs) / 60;
if (progress > 0) {
- cr.set_line_width (10);
- cr.set_line_cap (Cairo.LineCap.ROUND);
cr.arc (center_x, center_y, radius, 1.5 * Math.PI, (1.5 + progress * 2 ) * Math.PI);
Gdk.cairo_set_source_rgba (cr, color);
cr.stroke ();
}
- if (millisecs > 0) {
- progress = millisecs;
- if (progress > 0) {
- cr.set_line_width (2);
- if (progress < (seconds + millisecs) / 60) {
- context.add_class ("inverted");
- color = context.get_color (Gtk.StateFlags.NORMAL);
- }
- cr.arc (center_x, center_y, radius, 1.5 * Math.PI, (1.5 + progress * 2 ) * Math.PI);
- Gdk.cairo_set_source_rgba (cr, color);
- cr.stroke ();
- }
+ context.restore ();
+
+ context.save ();
+ context.add_class ("progress-fast");
+
+ color = context.get_color (Gtk.StateFlags.NORMAL);
+ progress = millisecs;
+ if (progress > 0) {
+ cr.arc (center_x, center_y, radius, (1.5 + progress * 2 ) * Math.PI - 0.1, (1.5 + progress * 2 )
* Math.PI + 0.1);
+ Gdk.cairo_set_source_rgba (cr, color);
+ cr.stroke ();
}
context.restore ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]