diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-05 11:37:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-05 17:05:04 +0200 |
commit | 5ae01ffa70549b1a4d9f166d0528a8d04a5dc858 (patch) | |
tree | 3006d72ec6befba6f8d81bc55bcdcccc0b27a2cf /basctl/source/basicide/baside2b.cxx | |
parent | f5109c38e2d5bd608fc6b94fde75e73d70e0c4f7 (diff) |
tdf#117388 use native scrollbar under gtk in basic editor
Change-Id: Id8f2b4fdc40116bb28053dc6fbbf6fa86e6808fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137862
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl/source/basicide/baside2b.cxx')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index fbda4447191e..249a636fdee7 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1940,7 +1940,7 @@ ComplexEditorWindow::ComplexEditorWindow( ModulWindow* pParent ) : aBrkWindow(VclPtr<BreakPointWindow>::Create(this, pParent)), aLineNumberWindow(VclPtr<LineNumberWindow>::Create(this, pParent)), aEdtWindow(VclPtr<EditorWindow>::Create(this, pParent)), - aEWVScrollBar( VclPtr<ScrollBar>::Create(this, WB_VSCROLL | WB_DRAG) ) + aEWVScrollBar( VclPtr<ScrollAdaptor>::Create(this, false) ) { aEdtWindow->Show(); aBrkWindow->Show(); @@ -1995,17 +1995,16 @@ void ComplexEditorWindow::Resize() aEWVScrollBar->SetPosSizePixel( Point( aOutSz.Width() - DWBORDER - nSBWidth, DWBORDER ), Size( nSBWidth, aSz.Height() ) ); } -IMPL_LINK(ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar, void ) +IMPL_LINK_NOARG(ComplexEditorWindow, ScrollHdl, weld::Scrollbar&, void) { if (aEdtWindow->GetEditView()) { - DBG_ASSERT( pCurScrollBar == aEWVScrollBar.get(), "Who is scrolling?" ); - tools::Long nDiff = aEdtWindow->GetEditView()->GetStartDocPos().Y() - pCurScrollBar->GetThumbPos(); + tools::Long nDiff = aEdtWindow->GetEditView()->GetStartDocPos().Y() - aEWVScrollBar->GetThumbPos(); aEdtWindow->GetEditView()->Scroll( 0, nDiff ); aBrkWindow->DoScroll( nDiff ); aLineNumberWindow->DoScroll( nDiff ); aEdtWindow->GetEditView()->ShowCursor(false); - pCurScrollBar->SetThumbPos( aEdtWindow->GetEditView()->GetStartDocPos().Y() ); + aEWVScrollBar->SetThumbPos( aEdtWindow->GetEditView()->GetStartDocPos().Y() ); } } |