Changeset - 8a60379a2f32
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 8 years ago 2017-04-24 16:14:51
hy@ozderya.net
fix scrollbar glitch at start
1 file changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/scrollzoomer.cpp
Show inline comments
 
@@ -238,12 +238,17 @@ bool ScrollZoomer::eventFilter( QObject 
 
                rect.setSize( static_cast<QResizeEvent *>( event )->size() );
 
                rect.adjust( left, top, -right, -bottom );
 

	
 
                layoutScrollBars( rect );
 
                break;
 
            }
 
            case QEvent::Show:
 
            {
 
                layoutScrollBars( canvas()->contentsRect() );
 
                break;
 
            }
 
            case QEvent::ChildRemoved:
 
            {
 
                const QObject *child =
 
                    static_cast<QChildEvent *>( event )->child();
 

	
 
                if ( child == d_cornerWidget )
 
@@ -400,12 +405,14 @@ void ScrollZoomer::updateScrollBars()
 
    layoutScrollBars( canvas()->contentsRect() );
 
    plot()->updateLayout();
 
}
 

	
 
void ScrollZoomer::layoutScrollBars( const QRect &rect )
 
{
 
    qDebug() << "layoutScrollBars" << rect;
 

	
 
    int hPos = xAxis();
 
    if ( hScrollBarPosition() == OppositeToScale )
 
        hPos = oppositeAxis( hPos );
 

	
 
    int vPos = yAxis();
 
    if ( vScrollBarPosition() == OppositeToScale )
0 comments (0 inline, 0 general)