mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:02:41 +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 DoOPMoveColRow(IsColumn: Boolean; FromIndex, ToIndex: Integer);
|
||||||
procedure DoPasteFromClipboard; virtual;
|
procedure DoPasteFromClipboard; virtual;
|
||||||
procedure DoPrepareCanvas(aCol,aRow:Integer; aState: TGridDrawState); virtual;
|
procedure DoPrepareCanvas(aCol,aRow:Integer; aState: TGridDrawState); virtual;
|
||||||
|
procedure DoOnResize; override;
|
||||||
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
||||||
function DoUTF8KeyPress(var UTF8Key: TUTF8Char): boolean; override;
|
function DoUTF8KeyPress(var UTF8Key: TUTF8Char): boolean; override;
|
||||||
procedure DrawBorder;
|
procedure DrawBorder;
|
||||||
@ -7179,6 +7180,13 @@ begin
|
|||||||
OnPrepareCanvas(Self, aCol, aRow, aState);
|
OnPrepareCanvas(Self, aCol, aRow, aState);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomGrid.DoOnResize;
|
||||||
|
begin
|
||||||
|
inherited DoOnResize;
|
||||||
|
if FUpdateCount=0 then
|
||||||
|
TWSCustomGridClass(WidgetSetClass).Invalidate(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomGrid.DoSetBounds(ALeft, ATop, AWidth, AHeight: integer);
|
procedure TCustomGrid.DoSetBounds(ALeft, ATop, AWidth, AHeight: integer);
|
||||||
begin
|
begin
|
||||||
FLastWidth := ClientWidth;
|
FLastWidth := ClientWidth;
|
||||||
|
@ -39,6 +39,7 @@ type
|
|||||||
published
|
published
|
||||||
class function GetEditorBoundsFromCellRect(ACanvas: TCanvas;
|
class function GetEditorBoundsFromCellRect(ACanvas: TCanvas;
|
||||||
const ACellRect: TRect; const AColumnLayout: TTextLayout): TRect; override;
|
const ACellRect: TRect; const AColumnLayout: TTextLayout): TRect; override;
|
||||||
|
class procedure Invalidate(sender: TCustomGrid); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -65,4 +66,9 @@ begin
|
|||||||
Result.Bottom:=Result.Top+TextHeight;
|
Result.Bottom:=Result.Top+TextHeight;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TGtk2WSCustomGrid.Invalidate(sender: TCustomGrid);
|
||||||
|
begin
|
||||||
|
Sender.Invalidate;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -50,6 +50,7 @@ type
|
|||||||
published
|
published
|
||||||
class procedure SendCharToEditor(AEditor:TWinControl; Ch: TUTF8Char); virtual;
|
class procedure SendCharToEditor(AEditor:TWinControl; Ch: TUTF8Char); virtual;
|
||||||
class function InvalidateStartY(const FixedHeight, RowOffset: Integer): integer; virtual;
|
class function InvalidateStartY(const FixedHeight, RowOffset: Integer): integer; virtual;
|
||||||
|
class procedure Invalidate(sender: TCustomGrid); virtual;
|
||||||
class function GetEditorBoundsFromCellRect(ACanvas: TCanvas;
|
class function GetEditorBoundsFromCellRect(ACanvas: TCanvas;
|
||||||
const ACellRect: TRect; const AColumnLayout: TTextLayout): TRect; virtual;
|
const ACellRect: TRect; const AColumnLayout: TTextLayout): TRect; virtual;
|
||||||
end;
|
end;
|
||||||
@ -122,6 +123,11 @@ begin
|
|||||||
result := FixedHeight;
|
result := FixedHeight;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWSCustomGrid.Invalidate(sender: TCustomGrid);
|
||||||
|
begin
|
||||||
|
// override in widgetset level if needed
|
||||||
|
end;
|
||||||
|
|
||||||
{ WidgetSetRegistration }
|
{ WidgetSetRegistration }
|
||||||
|
|
||||||
function RegisterCustomGrid: Boolean;
|
function RegisterCustomGrid: Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user