mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 01:29:08 +02:00
LCL, limit position of scrollbar in dbgrid on new records (fix gtk2 scrollbar issues on some themes)
git-svn-id: trunk@21580 -
This commit is contained in:
parent
c1afea1846
commit
1ecbf0622e
@ -38,7 +38,7 @@ unit DBGrids;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, DB,
|
Classes, SysUtils, Math, FileUtil, DB,
|
||||||
LCLStrConsts, LCLIntf, LCLProc, LCLType, LMessages, LResources,
|
LCLStrConsts, LCLIntf, LCLProc, LCLType, LMessages, LResources,
|
||||||
Controls, StdCtrls, Graphics, Grids, Dialogs, Themes;
|
Controls, StdCtrls, Graphics, Grids, Dialogs, Themes;
|
||||||
|
|
||||||
@ -1368,7 +1368,7 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
ScrollInfo.nMin := 0;
|
ScrollInfo.nMin := 0;
|
||||||
ScrollInfo.nMax := aRange;
|
ScrollInfo.nMax := aRange;
|
||||||
ScrollInfo.nPos := aPos;
|
ScrollInfo.nPos := Min(aPos,aRange-aPage);
|
||||||
ScrollInfo.nPage := aPage;
|
ScrollInfo.nPage := aPage;
|
||||||
// the redraw argument of SetScrollInfo means under gtk
|
// the redraw argument of SetScrollInfo means under gtk
|
||||||
// if the scrollbar is visible or not, in windows it
|
// if the scrollbar is visible or not, in windows it
|
||||||
|
Loading…
Reference in New Issue
Block a user