mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 09:20:49 +02:00
TAChart: Fix painting of checkboxes in TChartListBox on COCOA.
git-svn-id: trunk@62628 -
This commit is contained in:
parent
1edbd8db4d
commit
d47d48cd56
@ -289,10 +289,6 @@ procedure TChartListbox.DrawItem(
|
|||||||
AIndex: Integer; ARect: TRect; AState: TOwnerDrawState);
|
AIndex: Integer; ARect: TRect; AState: TOwnerDrawState);
|
||||||
{ draws the listbox item }
|
{ draws the listbox item }
|
||||||
const
|
const
|
||||||
UNTHEMED_FLAGS: array [TCheckboxesStyle, Boolean] of Integer = (
|
|
||||||
(DFCS_BUTTONCHECK, DFCS_BUTTONCHECK or DFCS_CHECKED),
|
|
||||||
(DFCS_BUTTONRADIO, DFCS_BUTTONRADIO or DFCS_CHECKED)
|
|
||||||
);
|
|
||||||
THEMED_FLAGS: array [TCheckboxesStyle, Boolean] of TThemedButton = (
|
THEMED_FLAGS: array [TCheckboxesStyle, Boolean] of TThemedButton = (
|
||||||
(tbCheckBoxUncheckedNormal, tbCheckBoxCheckedNormal),
|
(tbCheckBoxUncheckedNormal, tbCheckBoxCheckedNormal),
|
||||||
(tbRadioButtonUnCheckedNormal, tbRadioButtonCheckedNormal)
|
(tbRadioButtonUnCheckedNormal, tbRadioButtonCheckedNormal)
|
||||||
@ -316,13 +312,8 @@ begin
|
|||||||
|
|
||||||
if cloShowCheckboxes in Options then begin
|
if cloShowCheckboxes in Options then begin
|
||||||
ch := Checked[AIndex];
|
ch := Checked[AIndex];
|
||||||
if ThemeServices.ThemesEnabled then begin
|
te := ThemeServices.GetElementDetails(THEMED_FLAGS[FCheckStyle, ch]);
|
||||||
te := ThemeServices.GetElementDetails(THEMED_FLAGS[FCheckStyle, ch]);
|
ThemeServices.DrawElement(Canvas.Handle, te, rcb);
|
||||||
ThemeServices.DrawElement(Canvas.Handle, te, rcb);
|
|
||||||
end
|
|
||||||
else
|
|
||||||
DrawFrameControl(
|
|
||||||
Canvas.Handle, rcb, DFC_BUTTON, UNTHEMED_FLAGS[FCheckStyle, ch]);
|
|
||||||
x := rcb.Right;
|
x := rcb.Right;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user