mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 13:36:17 +02:00
lcl: remove win32 workaround to realign TCustomPage. Not necessary after 39661
git-svn-id: trunk@39678 -
This commit is contained in:
parent
be9e302113
commit
ef24adff3a
@ -334,7 +334,6 @@ type
|
|||||||
FOwnerDraw: Boolean;
|
FOwnerDraw: Boolean;
|
||||||
FPageIndex: Integer;
|
FPageIndex: Integer;
|
||||||
FPageIndexOnLastChange: integer;// needed for unique OnChange events
|
FPageIndexOnLastChange: integer;// needed for unique OnChange events
|
||||||
FPageIndexOnLastShow: integer;
|
|
||||||
FPageList: TList; // TListWithEvent of TCustomPage
|
FPageList: TList; // TListWithEvent of TCustomPage
|
||||||
FRaggedRight: Boolean;
|
FRaggedRight: Boolean;
|
||||||
FScrollOpposite: Boolean;
|
FScrollOpposite: Boolean;
|
||||||
|
@ -226,7 +226,6 @@ begin
|
|||||||
|
|
||||||
FPageIndex := -1;
|
FPageIndex := -1;
|
||||||
FLoadedPageIndex:=-1;
|
FLoadedPageIndex:=-1;
|
||||||
FPageIndexOnLastShow:=-1;
|
|
||||||
|
|
||||||
ControlStyle := []; // do not add csAcceptsControls
|
ControlStyle := []; // do not add csAcceptsControls
|
||||||
TabPosition := tpTop;
|
TabPosition := tpTop;
|
||||||
@ -943,7 +942,6 @@ begin
|
|||||||
FLoadedPageIndex := -1;
|
FLoadedPageIndex := -1;
|
||||||
//DebugLn(['TCustomTabControl.Loaded ',DbgSName(Self),' fPageIndex=',fPageIndex]);
|
//DebugLn(['TCustomTabControl.Loaded ',DbgSName(Self),' fPageIndex=',fPageIndex]);
|
||||||
FPageIndexOnLastChange := PageIndex;
|
FPageIndexOnLastChange := PageIndex;
|
||||||
FPageIndexOnLastShow := FPageIndexOnLastChange;
|
|
||||||
if HandleAllocated then DoCreateWnd;
|
if HandleAllocated then DoCreateWnd;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1022,27 +1020,8 @@ begin
|
|||||||
if (FPageIndex >= 0) and (FPageIndex < PageCount) then
|
if (FPageIndex >= 0) and (FPageIndex < PageCount) then
|
||||||
begin
|
begin
|
||||||
CurPage := Page[FPageIndex];
|
CurPage := Page[FPageIndex];
|
||||||
// first make the new page visible
|
CurPage.Visible := True;
|
||||||
//DebugLn(['TCustomTabControl.ShowCurrentPage ',DbgSName(CurPage),' CurPage.Visible=',CurPage.Visible]);
|
//DebugLn(['TCustomTabControl.ShowCurrentPage CurPage.AutoSizeDelayed=',CurPage.AutoSizeDelayed,' ',dbgs(CurPage.ComponentState),' ',CurPage.HandleAllocated]);
|
||||||
CurPage.UpdateControlState;
|
|
||||||
if CurPage.Visible then
|
|
||||||
begin
|
|
||||||
if FPageIndexOnLastShow <> FPageIndex then
|
|
||||||
begin
|
|
||||||
// some widgetsets like win32/64 do not send WM_SIZE messages for
|
|
||||||
// hidden pages. Force resizing page (it is alClient).
|
|
||||||
//DebugLn(['TCustomTabControl.ShowCurrentPage ',dbgsName(Self),' ',DbgSName(CurPage),' CurPage.Visible=',CurPage.Visible,' BoundsRect=',dbgs(BoundsRect),' ClientRect=',dbgs(ClientRect),' CurPage.BoundsRect=',dbgs(CurPage.BoundsRect),' CurPage.ClientRect=',dbgs(CurPage.ClientRect)]);
|
|
||||||
ReAlign;
|
|
||||||
// TCustomPage.IsControlVisible is overriden
|
|
||||||
// therefore AutoSizing of children was skipped => do it now
|
|
||||||
CurPage.ReAlign;
|
|
||||||
end;
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
CurPage.Visible := true;
|
|
||||||
//DebugLn(['TCustomTabControl.ShowCurrentPage CurPage.AutoSizeDelayed=',CurPage.AutoSizeDelayed,' ',dbgs(CurPage.ComponentState),' ',CurPage.HandleAllocated]);
|
|
||||||
end;
|
|
||||||
FPageIndexOnLastShow := FPageIndex;
|
|
||||||
end;
|
end;
|
||||||
if (FPageIndexOnLastChange >= 0) and (FPageIndexOnLastChange < PageCount) and
|
if (FPageIndexOnLastChange >= 0) and (FPageIndexOnLastChange < PageCount) and
|
||||||
(FPageIndexOnLastChange <> FPageIndex) then
|
(FPageIndexOnLastChange <> FPageIndex) then
|
||||||
|
Loading…
Reference in New Issue
Block a user