[gnome-shell] Redo highlight-drawing logic slightly, as suggested by Owen
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Redo highlight-drawing logic slightly, as suggested by Owen
- Date: Thu, 13 Aug 2009 17:52:07 +0000 (UTC)
commit b94452ee42e0cb90a653a2c62f089b92b6db5d63
Author: Dan Winship <danw gnome org>
Date: Thu Aug 13 13:51:48 2009 -0400
Redo highlight-drawing logic slightly, as suggested by Owen
src/shell-drawing.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/shell-drawing.c b/src/shell-drawing.c
index 44eafd4..ff3ab3d 100644
--- a/src/shell-drawing.c
+++ b/src/shell-drawing.c
@@ -194,7 +194,7 @@ shell_draw_app_highlight (ClutterCairoTexture *texture,
}
else
{
- int num_circles;
+ int num_circles, i;
double scale, highlight_width;
num_circles = num_windows == 2 ? 2 : 3;
@@ -207,17 +207,14 @@ shell_draw_app_highlight (ClutterCairoTexture *texture,
scale = MIN (height / 2.0, width / highlight_width);
cairo_scale (cr, scale, scale);
- /* Leftmost circle first; its left side is at
- * -highlight_width/2, so its center is that plus 1.
+ /* The leftmost circle's left side is at -highlight_width/2, so
+ * its center is that plus 1.
*/
cairo_translate (cr, -highlight_width / 2.0 + 1.0, 0.0);
- draw_glow (cr, red, green, blue, alpha);
-
- /* Remaining circles */
- while (--num_circles)
+ for (i = 0; i < num_circles; i++)
{
- cairo_translate (cr, 1.8, 0.0);
draw_glow (cr, red, green, blue, alpha);
+ cairo_translate (cr, 1.8, 0.0);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]