Get correct value for scrollbar width

This commit is contained in:
Daniel Winzen
2015-01-04 12:38:44 +01:00
parent ebb2f75458
commit c11a15d0d0
2 changed files with 2 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ public:
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
virtual void loadSettings( const QDomElement & _this );
QWidget * contentWidget()
QScrollArea * contentWidget()
{
return( m_scrollArea );
}

View File

@@ -722,7 +722,7 @@ void SongEditor::updatePosition( const MidiTime & _t )
{
const int w = width() - widgetWidth
- trackOpWidth
- 32; // rough estimation for width of right scrollbar
- contentWidget()->verticalScrollBar()->width(); // width of right scrollbar
if( _t > m_currentPosition + w * MidiTime::ticksPerTact() /
pixelsPerTact() )
{