mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 11:37:21 +01:00
LCL, TCoolbar: Replace Resize with WMSize. Issue #26096, patch from Vojtech Cihak.
git-svn-id: trunk@44994 -
This commit is contained in:
parent
6ec7357462
commit
8dc1a9ed65
@ -2361,8 +2361,6 @@ type
|
||||
FDragBand: TDragBand;
|
||||
FDraggedBandIndex: Integer; // -1 .. space below the last row; other negative .. invalid area
|
||||
FDragInitPos: Integer; // Initial mouse X - position (for resizing Bands)
|
||||
FPrevHeight: Integer;
|
||||
FPrevWidth: Integer;
|
||||
FTextHeight: Integer;
|
||||
procedure AlignControls(AControl: TControl; var RemainingClientRect: TRect); override;
|
||||
procedure BitmapOrImageListChange(Sender: TObject);
|
||||
@ -2383,8 +2381,8 @@ type
|
||||
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure Paint; override;
|
||||
procedure Resize; override;
|
||||
procedure SetAlign(aValue: TAlign); reintroduce;
|
||||
procedure WMSize(var Message: TLMSize); message LM_SIZE;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
||||
@ -504,8 +504,6 @@ begin
|
||||
if aCountM1 >= 0 then EnableAutoSizing;
|
||||
dec(FUpdateCount);
|
||||
end;
|
||||
FPrevWidth := Width;
|
||||
FPrevHeight := Height;
|
||||
end;
|
||||
|
||||
procedure TCustomCoolBar.CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer;
|
||||
@ -957,19 +955,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomCoolBar.Resize;
|
||||
var aWidth, aHeight: Integer;
|
||||
procedure TCustomCoolBar.WMSize(var Message: TLMSize);
|
||||
begin
|
||||
//DebugLn('Resize');
|
||||
inherited Resize;
|
||||
aWidth := Width;
|
||||
aHeight := Height;
|
||||
if ((aWidth <> FPrevWidth) or (aHeight <> FPrevHeight))
|
||||
and (aWidth*aHeight > 0) and HandleAllocated then
|
||||
begin
|
||||
//DebugLn('Resize calls CalcAndAlign');
|
||||
//DebugLn('WMSize');
|
||||
inherited WMSize(Message);
|
||||
CalculateAndAlign;
|
||||
Invalidate; //Required by GTK2
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user