mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 20:21:04 +02:00
datetimectrls: datetimepicker: explicitely center themed drop-down arrow - some WS require it. Issue #31383
git-svn-id: trunk@54147 -
This commit is contained in:
parent
fb129e0123
commit
e2b4f692bc
@ -3599,13 +3599,18 @@ procedure TDTSpeedButton.Paint;
|
|||||||
var
|
var
|
||||||
Details: TThemedElementDetails;
|
Details: TThemedElementDetails;
|
||||||
ArrowState: TThemedToolBar;
|
ArrowState: TThemedToolBar;
|
||||||
|
ASize: TSize;
|
||||||
|
ARect: TRect;
|
||||||
begin
|
begin
|
||||||
if Enabled then
|
if Enabled then
|
||||||
ArrowState := ttbSplitButtonDropDownNormal
|
ArrowState := ttbSplitButtonDropDownNormal
|
||||||
else
|
else
|
||||||
ArrowState := ttbSplitButtonDropDownDisabled;
|
ArrowState := ttbSplitButtonDropDownDisabled;
|
||||||
Details := ThemeServices.GetElementDetails(ArrowState);
|
Details := ThemeServices.GetElementDetails(ArrowState);
|
||||||
ThemeServices.DrawElement(Canvas.Handle, Details, DropDownButtonRect);
|
ASize := ThemeServices.GetDetailSize(Details);
|
||||||
|
ARect := DropDownButtonRect;
|
||||||
|
InflateRect(ARect, -(ARect.Right-ARect.Left-ASize.cx) div 2, 0);
|
||||||
|
ThemeServices.DrawElement(Canvas.Handle, Details, ARect);
|
||||||
end;
|
end;
|
||||||
const
|
const
|
||||||
ArrowColor = TColor($8D665A);
|
ArrowColor = TColor($8D665A);
|
||||||
|
Loading…
Reference in New Issue
Block a user