Mercurial > hg > svgui
changeset 738:d26545a2a02d tonioni
Rather than undrawing the bottom bit of the dial, don't draw it in the first place (necessary on shaded background)
author | Chris Cannam |
---|---|
date | Thu, 06 Mar 2014 13:52:33 +0000 |
parents | 0c1ef0d05c82 |
children | dfe543438d52 |
files | widgets/AudioDial.cpp |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/widgets/AudioDial.cpp Thu Mar 06 10:57:29 2014 +0000 +++ b/widgets/AudioDial.cpp Thu Mar 06 13:52:33 2014 +0000 @@ -231,31 +231,31 @@ c = c.light(110); } - // Scale shadow... + // Scale shadow, omitting the bottom part... shadowAngle = 2160; - c = palette().dark().color(); - for (int arc = 120; arc < 2880; arc += 240) { + c = palette().shadow().color(); + for (int i = 0; i < 5; ++i) { pen.setColor(c); paint.setPen(pen); + int arc = i * 240 + 120; paint.drawArc(scale/2, scale/2, width-scale, width-scale, shadowAngle + arc, 240); + c = c.light(110); + } + c = palette().shadow().color(); + for (int i = 0; i < 12; ++i) { + pen.setColor(c); + paint.setPen(pen); + int arc = i * 240 + 120; paint.drawArc(scale/2, scale/2, width-scale, width-scale, shadowAngle - arc, 240); - c = c.light(108); + c = c.light(110); } - // Undraw the bottom part... - - pen.setColor(palette().background().color()); - pen.setWidth(scale * 4); - paint.setPen(pen); - paint.drawArc(scale/2, scale/2, - width-scale, width-scale, -45 * 16, -92 * 16); - // Scale ends... - pen.setColor(palette().dark().color()); + pen.setColor(palette().shadow().color()); pen.setWidth(scale); paint.setPen(pen); for (int i = 0; i < numTicks; ++i) {