diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-03-13 18:46:17 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-03-13 18:46:17 +0100 |
commit | d55de707c3352a468a227d69920a56ef2550a7cc (patch) | |
tree | 3f7ac91962d7e09328fb24d4eb52707a3f6e7f22 /plugingui/knob.cc | |
parent | c17046353762a0893914e671f1f19eadce6f94f5 (diff) |
Added path lineedit and drive selection (win32) to filebrowser. Made a lot of small layout tweaks.
Diffstat (limited to 'plugingui/knob.cc')
-rw-r--r-- | plugingui/knob.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/plugingui/knob.cc b/plugingui/knob.cc index d50d5c2..1a0148f 100644 --- a/plugingui/knob.cc +++ b/plugingui/knob.cc @@ -170,8 +170,8 @@ void GUI::Knob::repaintEvent(GUI::RepaintEvent *e) char buf[64]; sprintf(buf, "%.2f", val * maximum); Font font; - p.drawText(center_x - font.textWidth(buf) / 2, - center_y + font.textHeight(buf) / 2, font, buf); + p.drawText(center_x - font.textWidth(buf) / 2 + 1, + center_y + font.textHeight(buf) / 2 + 1, font, buf); p.setColour(Colour(1, alpha)); @@ -182,11 +182,15 @@ void GUI::Knob::repaintEvent(GUI::RepaintEvent *e) 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, 1)); - p.drawLine(border_x * (radius / 2) + center_x, - border_y * (radius / 2) + center_y, - border_x * radius + center_x, - border_y * radius + center_y); + p.setColour(Colour(1, 0, 0, 0.6)); + for(int _x = -1; _x < 2; _x++) { + for(int _y = -1; _y < 2; _y++) { + p.drawLine(border_x * (radius / 2) + center_x + _x, + border_y * (radius / 2) + center_y + _y, + border_x * radius + center_x + _x, + border_y * radius + center_y + _y); + } + } } #ifdef TEST_KNOB |