mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 10:39:30 +02:00
LCL, fix grids resizing bug in gtk, issue #35096
git-svn-id: trunk@60734 -
This commit is contained in:
parent
f414bde383
commit
44c14d648b
@ -1003,6 +1003,7 @@ type
|
||||
procedure DoOPMoveColRow(IsColumn: Boolean; FromIndex, ToIndex: Integer);
|
||||
procedure DoPasteFromClipboard; virtual;
|
||||
procedure DoPrepareCanvas(aCol,aRow:Integer; aState: TGridDrawState); virtual;
|
||||
procedure DoOnResize; override;
|
||||
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
||||
function DoUTF8KeyPress(var UTF8Key: TUTF8Char): boolean; override;
|
||||
procedure DrawBorder;
|
||||
@ -7179,6 +7180,13 @@ begin
|
||||
OnPrepareCanvas(Self, aCol, aRow, aState);
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.DoOnResize;
|
||||
begin
|
||||
inherited DoOnResize;
|
||||
if FUpdateCount=0 then
|
||||
TWSCustomGridClass(WidgetSetClass).Invalidate(Self);
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.DoSetBounds(ALeft, ATop, AWidth, AHeight: integer);
|
||||
begin
|
||||
FLastWidth := ClientWidth;
|
||||
|
@ -39,6 +39,7 @@ type
|
||||
published
|
||||
class function GetEditorBoundsFromCellRect(ACanvas: TCanvas;
|
||||
const ACellRect: TRect; const AColumnLayout: TTextLayout): TRect; override;
|
||||
class procedure Invalidate(sender: TCustomGrid); override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -65,4 +66,9 @@ begin
|
||||
Result.Bottom:=Result.Top+TextHeight;
|
||||
end;
|
||||
|
||||
class procedure TGtk2WSCustomGrid.Invalidate(sender: TCustomGrid);
|
||||
begin
|
||||
Sender.Invalidate;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -50,6 +50,7 @@ type
|
||||
published
|
||||
class procedure SendCharToEditor(AEditor:TWinControl; Ch: TUTF8Char); virtual;
|
||||
class function InvalidateStartY(const FixedHeight, RowOffset: Integer): integer; virtual;
|
||||
class procedure Invalidate(sender: TCustomGrid); virtual;
|
||||
class function GetEditorBoundsFromCellRect(ACanvas: TCanvas;
|
||||
const ACellRect: TRect; const AColumnLayout: TTextLayout): TRect; virtual;
|
||||
end;
|
||||
@ -122,6 +123,11 @@ begin
|
||||
result := FixedHeight;
|
||||
end;
|
||||
|
||||
class procedure TWSCustomGrid.Invalidate(sender: TCustomGrid);
|
||||
begin
|
||||
// override in widgetset level if needed
|
||||
end;
|
||||
|
||||
{ WidgetSetRegistration }
|
||||
|
||||
function RegisterCustomGrid: Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user