vcl/source/treelist/svimpbox.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 7d459621de27574f02588190e5fef7804cc3a0c1 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Nov 30 11:41:41 2018 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Dec 1 13:40:38 2018 +0100 turn on hori scrollbar if WB_AUTOHSCROLL set and content doesn't fit Change-Id: I8812d6d5ccce6f84298a4c978c50f1e84653c559 Reviewed-on: https://gerrit.libreoffice.org/64341 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index e61b0ebb05d4..a39b18744878 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -1174,7 +1174,7 @@ void SvImpLBox::AdjustScrollBars( Size& rSize ) aOrigin.setX( aOrigin.X() * -1 ); nMaxRight += aOrigin.X() - 1; long nVis = nMostRight - aOrigin.X(); - if( (nWindowStyle & WB_HSCROLL) && + if( (nWindowStyle & (WB_AUTOHSCROLL|WB_HSCROLL)) && (nVis < nMostRight || nMaxRight < nMostRight) ) { bHorBar = true; @@ -1193,7 +1193,7 @@ void SvImpLBox::AdjustScrollBars( Size& rSize ) nMaxRight -= nVerSBarWidth; if( !bHorBar ) { - if( (nWindowStyle & WB_HSCROLL) && + if( (nWindowStyle & (WB_AUTOHSCROLL|WB_HSCROLL)) && (nVis < nMostRight || nMaxRight < nMostRight) ) bHorBar = true; } @@ -2115,7 +2115,6 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) SvTreeListEntry* pNewCursor; - const WinBits nWindowStyle = pView->GetStyle(); switch( aCode ) { case KEY_UP: @@ -2200,7 +2199,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) CallEventListeners( VclEventId::ListboxSelect, pCursor ); } } - else if( nWindowStyle & WB_HSCROLL ) + else if (aHorSBar->IsVisible()) { long nThumb = aHorSBar->GetThumbPos(); nThumb += aHorSBar->GetLineSize(); @@ -2231,7 +2230,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) CallEventListeners( VclEventId::ListboxSelect, pCursor ); } } - else if ( nWindowStyle & WB_HSCROLL ) + else if (aHorSBar->IsVisible()) { long nThumb = aHorSBar->GetThumbPos(); nThumb -= aHorSBar->GetLineSize(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits