mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 05:09:13 +02:00
LCL: TabControl fix paint border
git-svn-id: trunk@42565 -
This commit is contained in:
parent
62dff1c501
commit
64c8d977b6
@ -593,7 +593,7 @@ end;
|
||||
|
||||
procedure TTabControl.Paint;
|
||||
var
|
||||
ARect: TRect;
|
||||
ARect, ARect2: TRect;
|
||||
TS: TTextStyle;
|
||||
Details: TThemedElementDetails;
|
||||
lCanvas: TCanvas;
|
||||
@ -607,7 +607,15 @@ begin
|
||||
AdjustDisplayRectWithBorder(ARect);
|
||||
|
||||
Details := ThemeServices.GetElementDetails(ttPane);
|
||||
ThemeServices.DrawElement(lCanvas.Handle, Details, ARect);
|
||||
ARect2 := ARect;
|
||||
// paint 1 pixel under the header, to avoid painting a closing border
|
||||
case TabPosition of
|
||||
tpTop: ARect2.Top := ARect2.Top - 1;
|
||||
tpBottom: ARect2.Bottom := ARect2.Bottom + 1;
|
||||
tpLeft: ARect2.Left := ARect2.Left - 1;
|
||||
tpRight: ARect2.Right := ARect2.Right + 1;
|
||||
end;
|
||||
ThemeServices.DrawElement(lCanvas.Handle, Details, ARect2);
|
||||
|
||||
InflateRect(ARect,BorderWidth,BorderWidth);
|
||||
lCanvas.Frame3d(ARect, BorderWidth, bvRaised);
|
||||
|
@ -438,7 +438,7 @@ begin
|
||||
// The bigger offset is the height of the tab
|
||||
Result := Max(R.Top, -R.Bottom)
|
||||
// but includes spacing for the child
|
||||
- Min(R.Top, -R.Bottom) div 2;
|
||||
- 1;
|
||||
end;
|
||||
|
||||
class function TWin32WSCustomTabControl.GetNotebookMinTabWidth(const AWinControl: TWinControl): integer;
|
||||
@ -455,7 +455,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
Result := Max(R.Left, -R.Right)
|
||||
- Min(R.Left, -R.Right) div 2;
|
||||
- 1;
|
||||
end;
|
||||
|
||||
{ -----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user