*/
public enum LedColor {
+ OFF = 0,
R = 1,
G = 2,
B = 4,
public LedColor color;
public LedColorWidget () {
- color = LedColor.RGB;
+ color = LedColor.OFF;
}
public LedColorWidget.with_color (LedColor _color) {
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 ();