mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 12:30:36 +02:00
LCL: TabControl; better clientarea
git-svn-id: trunk@42636 -
This commit is contained in:
parent
2b640c6174
commit
b150be0281
@ -373,16 +373,18 @@ end;
|
|||||||
{ TTabControl }
|
{ TTabControl }
|
||||||
|
|
||||||
procedure TTabControl.AdjustDisplayRect(var ARect: TRect);
|
procedure TTabControl.AdjustDisplayRect(var ARect: TRect);
|
||||||
|
const
|
||||||
|
TabControlInternalBorder = 2; // TTabControl paints a border, so limit the children, to be within that border
|
||||||
begin
|
begin
|
||||||
AdjustDisplayRectWithBorder(ARect);
|
AdjustDisplayRectWithBorder(ARect);
|
||||||
if TabPosition<>tpTop then
|
if TabPosition<>tpTop then
|
||||||
ARect.Top:=Min(Max(ARect.Top,ARect.Top+BorderWidth),ARect.Bottom);
|
ARect.Top:=Min(Max(ARect.Top,ARect.Top+BorderWidth+TabControlInternalBorder),ARect.Bottom);
|
||||||
if TabPosition<>tpBottom then
|
if TabPosition<>tpBottom then
|
||||||
ARect.Bottom:=Max(Min(ARect.Bottom,ARect.Bottom-BorderWidth),ARect.Top);
|
ARect.Bottom:=Max(Min(ARect.Bottom,ARect.Bottom-BorderWidth-TabControlInternalBorder),ARect.Top);
|
||||||
if TabPosition<>tpLeft then
|
if TabPosition<>tpLeft then
|
||||||
ARect.Left:=Min(Max(ARect.Left,ARect.Left+BorderWidth),ARect.Right);
|
ARect.Left:=Min(Max(ARect.Left,ARect.Left+BorderWidth+TabControlInternalBorder),ARect.Right);
|
||||||
if TabPosition<>tpRight then
|
if TabPosition<>tpRight then
|
||||||
ARect.Right:=Max(Min(ARect.Right,ARect.Right-BorderWidth),ARect.Left);
|
ARect.Right:=Max(Min(ARect.Right,ARect.Right-BorderWidth-TabControlInternalBorder),ARect.Left);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TTabControl.GetDisplayRect: TRect;
|
function TTabControl.GetDisplayRect: TRect;
|
||||||
|
Loading…
Reference in New Issue
Block a user