LED color widget: fix the clipping circle
authorPhilipp Zabel <philipp.zabel@gmail.com>
Sat, 27 Feb 2010 09:13:41 +0000 (10:13 +0100)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Sat, 27 Feb 2010 09:13:41 +0000 (10:13 +0100)
src/led-color-widgets.vala

index 258faec..867b3ab 100644 (file)
@@ -47,7 +47,7 @@ class LedColorWidget : Gtk.DrawingArea {
                ctx.clip ();
 
                ctx.new_path ();
-               ctx.arc (width / 2.0, height / 2.0, width / 2.0, 0, 2 * Math.PI);
+               ctx.arc (width / 2.0, height / 2.0, Math.fmin (width, height) / 2.0, 0, 2 * Math.PI);
 
                ctx.clip ();