[Xfce4-commits] <ristretto:master> Implement a minimum clock-size of ~40px

Stephan Arts noreply at xfce.org
Sun Apr 22 10:34:01 CEST 2012


Updating branch refs/heads/master
         to 236b4ce59f261eb7f7b078650d05dd79462f6d62 (commit)
       from 8cfcc61b2727366b9c9f6078b06cb5a2773071ad (commit)

commit 236b4ce59f261eb7f7b078650d05dd79462f6d62
Author: Stephan Arts <stephan at xfce.org>
Date:   Sun Apr 22 10:31:44 2012 +0200

    Implement a minimum clock-size of ~40px

 src/image_viewer.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/image_viewer.c b/src/image_viewer.c
index d6e7670..ff266b6 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -1053,11 +1053,11 @@ paint_clock (
 
     if (widget->allocation.width < widget->allocation.height)
     {
-        width = widget->allocation.width * 0.1;
+        width = 40 + ((gdouble)widget->allocation.width * 0.07);
     }
     else
     {
-        width = widget->allocation.height * 0.1;
+        width = 40 + ((gdouble)widget->allocation.height * 0.07);
     }
 
     height = width;
@@ -1095,7 +1095,7 @@ paint_clock (
         cairo_arc (
             ctx,
             00, -1*((width/2)-5),
-            3,
+            width/20,
             0,
             2*M_PI );
         cairo_fill (ctx);
@@ -1104,7 +1104,7 @@ paint_clock (
 
 /***/
     cairo_save (ctx);
-    cairo_set_line_width (ctx, 5.0);
+    cairo_set_line_width (ctx, width/15);
     cairo_set_line_cap (ctx, CAIRO_LINE_CAP_ROUND);
     cairo_rotate (
         ctx,
@@ -1118,7 +1118,7 @@ paint_clock (
         ctx);
     cairo_restore (ctx);
 /***/
-    cairo_set_line_width (ctx, 5.0);
+    cairo_set_line_width (ctx, width/15);
     cairo_set_line_cap (ctx, CAIRO_LINE_CAP_ROUND);
     cairo_rotate (
         ctx,


More information about the Xfce4-commits mailing list