mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 07:39:26 +02:00
LCL: don't switch width and height when loading the scrolbar (bug #7993)
git-svn-id: trunk@10348 -
This commit is contained in:
parent
e2cfe24165
commit
18f0b57565
@ -83,22 +83,18 @@ var
|
||||
begin
|
||||
if FKind <> Value then begin
|
||||
FKind := Value;
|
||||
// switch width and height
|
||||
OldWidth:=Width;
|
||||
OldHeight:=Height;
|
||||
if csLoading in ComponentState then begin
|
||||
if ReadBounds.Right>ReadBounds.Left then
|
||||
OldWidth:=ReadBounds.Right-ReadBounds.Left;
|
||||
if ReadBounds.Bottom>ReadBounds.Top then
|
||||
OldHeight:=ReadBounds.Bottom-ReadBounds.Top;
|
||||
//debugln('TCustomScrollBar.SetKind ',DbgSName(Self),' ',dbgs(ReadBounds),' OldWidth=',dbgs(OldWidth),' OldHeight=',dbgs(OldHeight));
|
||||
// switch width and height, but not when loading, because we assume that
|
||||
// the lfm contains a consistent combination of kind and (width, height)
|
||||
if not (csLoading in ComponentState) then begin
|
||||
OldWidth:=Width;
|
||||
OldHeight:=Height;
|
||||
// TODO: Remove RecreateWnd
|
||||
if HandleAllocated then
|
||||
RecreateWnd(Self)
|
||||
else
|
||||
Constraints.UpdateInterfaceConstraints;
|
||||
SetBounds(Left,Top,OldHeight,OldWidth);
|
||||
end;
|
||||
// TODO: Remove RecreateWnd
|
||||
if HandleAllocated then
|
||||
RecreateWnd(Self)
|
||||
else
|
||||
Constraints.UpdateInterfaceConstraints;
|
||||
SetBounds(Left,Top,OldHeight,OldWidth);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user