jvcllaz: Add/improve LCLscaling for TJvTabBar and TJvPageList. Publish TJvPageList.BorderSpacing and .ChildSizing.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7417 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-04-29 07:33:49 +00:00
parent 94067dff3d
commit 91fdc9ea7f
2 changed files with 72 additions and 42 deletions

View File

@@ -231,7 +231,9 @@ type
property Align;
property Anchors;
property BiDiMode;
property BorderSpacing;
property BorderWidth;
property ChildSizing;
property DragCursor;
property DragKind;
property OnStartDock;
@@ -365,6 +367,7 @@ end;
procedure TJvCustomPage.DoPaint(ACanvas: TCanvas; ARect: TRect);
var
S: string;
margin: Integer;
begin
ACanvas.Font := Font;
ACanvas.Brush.Style := bsSolid;
@@ -384,7 +387,8 @@ begin
if S = '' then
S := Name;
// make some space around the edges
InflateRect(ARect, -4, -4);
margin := Scale96ToFont(4);
InflateRect(ARect, -margin, -margin);
if not Enabled then
begin
SetBkMode(ACanvas.Handle, LCLType.TRANSPARENT);
@@ -394,7 +398,7 @@ begin
ACanvas.Font.Color := clGrayText;
end;
DrawText(ACanvas.Handle, PChar(S), Length(S), ARect, GetDesignCaptionFlags(PageList.ShowDesignCaption) or DT_SINGLELINE);
InflateRect(ARect, 4, 4);
InflateRect(ARect, +margin, +margin);
end;
end;
if Assigned(FOnPaint) then