From 1160f47dc62f370d3e497e7acb18b0670b0cef3e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 10 Mar 2013 13:57:06 +0100 Subject: Give knob dark background and double white outline, like LineEdit widget. --- plugingui/knob.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugingui') diff --git a/plugingui/knob.cc b/plugingui/knob.cc index a80e325..d50d5c2 100644 --- a/plugingui/knob.cc +++ b/plugingui/knob.cc @@ -162,6 +162,9 @@ void GUI::Knob::repaintEvent(GUI::RepaintEvent *e) int center_x = width() / 2; int center_y = height() / 2; + p.setColour(Colour(0, 0.4)); + p.drawFilledCircle(center_x, center_y, radius); + p.setColour(Colour(1, alpha)); char buf[64]; @@ -173,13 +176,13 @@ void GUI::Knob::repaintEvent(GUI::RepaintEvent *e) p.setColour(Colour(1, alpha)); p.drawCircle(center_x, center_y, radius); - p.drawCircle(center_x, center_y, radius - 1); + p.drawCircle(center_x, center_y, radius - 2); double padval = val * 0.8 + 0.1; double border_x = sin((-1 * padval + 1) * 2 * M_PI); double border_y = cos((-1 * padval + 1) * 2 * M_PI); - p.setColour(Colour(1, 0, 0, alpha)); + p.setColour(Colour(1, 0, 0, 1)); p.drawLine(border_x * (radius / 2) + center_x, border_y * (radius / 2) + center_y, border_x * radius + center_x, -- cgit v1.2.3