# HG changeset patch # User Chris Cannam # Date 1394113953 0 # Node ID d26545a2a02dee4b8903b3d68aaa422a5042eda5 # Parent 0c1ef0d05c827cdbca6c746e815f8350777ade07 Rather than undrawing the bottom bit of the dial, don't draw it in the first place (necessary on shaded background) diff -r 0c1ef0d05c82 -r d26545a2a02d widgets/AudioDial.cpp --- 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) {