mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 18:20:34 +02:00
Qt,Qt5,Qt6: proper initialization of scrolled offset. issue #41513
(cherry picked from commit 9b5d42ffa5
)
Co-authored-by: zeljan1 <zeljko@holobit.hr>
This commit is contained in:
parent
a53bc7e03d
commit
37e4202ec6
@ -17718,6 +17718,14 @@ begin
|
||||
@ViewPortEventFilter);
|
||||
|
||||
setViewport(FViewPortWidget.Widget);
|
||||
|
||||
if (LCLObject is TScrollingWinControl) then
|
||||
begin
|
||||
if TScrollingWinControl(LCLObject).VertScrollBar.Visible then
|
||||
FViewportWidget.FScrollY := -TScrollingWinControl(LCLObject).VertScrollBar.Position;
|
||||
if TScrollingWinControl(LCLObject).HorzScrollBar.Visible then
|
||||
FViewportWidget.FScrollX := -TScrollingWinControl(LCLObject).HorzScrollBar.Position;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TQtCustomControl.viewportDelete;
|
||||
|
@ -18344,6 +18344,14 @@ begin
|
||||
@ViewPortEventFilter);
|
||||
|
||||
setViewport(FViewPortWidget.Widget);
|
||||
|
||||
if (LCLObject is TScrollingWinControl) then
|
||||
begin
|
||||
if TScrollingWinControl(LCLObject).VertScrollBar.Visible then
|
||||
FViewportWidget.FScrollY := -TScrollingWinControl(LCLObject).VertScrollBar.Position;
|
||||
if TScrollingWinControl(LCLObject).HorzScrollBar.Visible then
|
||||
FViewportWidget.FScrollX := -TScrollingWinControl(LCLObject).HorzScrollBar.Position;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TQtCustomControl.viewportDelete;
|
||||
|
@ -18251,6 +18251,14 @@ begin
|
||||
@ViewPortEventFilter);
|
||||
|
||||
setViewport(FViewPortWidget.Widget);
|
||||
|
||||
if (LCLObject is TScrollingWinControl) then
|
||||
begin
|
||||
if TScrollingWinControl(LCLObject).VertScrollBar.Visible then
|
||||
FViewportWidget.FScrollY := -TScrollingWinControl(LCLObject).VertScrollBar.Position;
|
||||
if TScrollingWinControl(LCLObject).HorzScrollBar.Visible then
|
||||
FViewportWidget.FScrollX := -TScrollingWinControl(LCLObject).HorzScrollBar.Position;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TQtCustomControl.viewportDelete;
|
||||
|
Loading…
Reference in New Issue
Block a user