From c11a15d0d0be7b9fd4e56f041e3a4c6a6b1eb2f5 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sun, 4 Jan 2015 12:38:44 +0100 Subject: [PATCH] Get correct value for scrollbar width --- include/TrackContainerView.h | 2 +- src/gui/SongEditor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/TrackContainerView.h b/include/TrackContainerView.h index 5201a92c6..e4a8c0d20 100644 --- a/include/TrackContainerView.h +++ b/include/TrackContainerView.h @@ -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 ); } diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index bb477be56..ae7236dc2 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -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() ) {