[gtk+] theme: Make spinner drawing start with the solid line
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] theme: Make spinner drawing start with the solid line
- Date: Sat, 5 Mar 2011 14:04:33 +0000 (UTC)
commit de3616d52c349fa304cf2625b81f639452e1d907
Author: Benjamin Otte <otte redhat com>
Date: Sat Mar 5 14:53:26 2011 +0100
theme: Make spinner drawing start with the solid line
Previously, for i == 0, we were drawing the translucent line first.
However, people reading the code would always assume the solid line is
indicated by the current step. So make the code do that.
Note that the spinner now rotates in the wrong direction. This will be
fixed in a future commit.
gtk/gtkthemingengine.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 2fdec73..bac646b 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -3003,8 +3003,8 @@ gtk_theming_engine_render_activity (GtkThemingEngine *engine,
gint inset = 0.7 * radius;
/* transparency is a function of time and intial value */
- gdouble t = (gdouble) ((i + num_steps - step)
- % num_steps) / num_steps;
+ gdouble t = 1.0 - (gdouble) ((i + num_steps - step)
+ % num_steps) / num_steps;
gdouble xscale = cos (i * G_PI / half);
gdouble yscale = sin (i * G_PI / half);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]