comparison widgets/Panner.cpp @ 437:755243c67f59

* Add vertical zoom and pan to time-value layer. Still some defects, particularly in logarithmic mode. Now need to get this in note layer as well! * Some fixes to log colouring in segmentation mode of time-value layer.
author Chris Cannam
date Fri, 24 Oct 2008 14:52:40 +0000
parents c492902dba40
children 76cd1c89eb06
comparison
equal deleted inserted replaced
436:1e0744b2cebe 437:755243c67f59
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);
167 int rh = lrintf(height() * m_rectHeight);
168 if (rw < 2) rw = 2;
169 if (rh < 2) rh = 2;
170
166 paint.drawRect(lrintf(width() * m_rectX), 171 paint.drawRect(lrintf(width() * m_rectX),
167 lrintf(height() * m_rectY), 172 lrintf(height() * m_rectY),
168 lrintf(width() * m_rectWidth), 173 rw, rh);
169 lrintf(height() * m_rectHeight));
170 } 174 }
171 175
172 void 176 void
173 Panner::normalise() 177 Panner::normalise()
174 { 178 {