summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-03-10 13:57:06 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-03-10 13:57:06 +0100
commit1160f47dc62f370d3e497e7acb18b0670b0cef3e (patch)
tree6d5b0ba73857e0d0c6e13d9104cb2a0c4f769e40
parent1ad5ab05bdd4a5d66370426c09d8d09c2ba39943 (diff)
Give knob dark background and double white outline, like LineEdit widget.
-rw-r--r--plugingui/knob.cc7
1 files changed, 5 insertions, 2 deletions
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,