comparison widgets/Panner.cpp @ 438:76cd1c89eb06

* minor tidy
author Chris Cannam
date Fri, 24 Oct 2008 16:21:57 +0000
parents 755243c67f59
children f4960f8ce798
comparison
equal deleted inserted replaced
437:755243c67f59 438:76cd1c89eb06
154 QColor bg(palette().background().color()); 154 QColor bg(palette().background().color());
155 bg.setAlpha(m_backgroundAlpha); 155 bg.setAlpha(m_backgroundAlpha);
156 156
157 paint.setPen(palette().dark().color()); 157 paint.setPen(palette().dark().color());
158 paint.setBrush(bg); 158 paint.setBrush(bg);
159 paint.drawRect(0, 0, width(), height()); 159 paint.drawRect(0, 0, width()-1, height()-1);
160 160
161 QColor hl(m_thumbColour); 161 QColor hl(m_thumbColour);
162 hl.setAlpha(m_thumbAlpha); 162 hl.setAlpha(m_thumbAlpha);
163 163
164 paint.setBrush(hl); 164 paint.setBrush(hl);
165 165
166 int rw = lrintf(width() * m_rectWidth); 166 int rw = lrintf((width() - 1) * m_rectWidth);
167 int rh = lrintf(height() * m_rectHeight); 167 int rh = lrintf((height() - 1) * m_rectHeight);
168 if (rw < 2) rw = 2; 168 if (rw < 2) rw = 2;
169 if (rh < 2) rh = 2; 169 if (rh < 2) rh = 2;
170 170
171 paint.drawRect(lrintf(width() * m_rectX), 171 paint.drawRect(lrintf(width() * m_rectX),
172 lrintf(height() * m_rectY), 172 lrintf(height() * m_rectY),