From d47d48cd56c9f9227088a5e6068552a7cbf7d3a0 Mon Sep 17 00:00:00 2001 From: wp Date: Wed, 12 Feb 2020 23:18:02 +0000 Subject: [PATCH] TAChart: Fix painting of checkboxes in TChartListBox on COCOA. git-svn-id: trunk@62628 - --- components/tachart/tachartlistbox.pas | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/components/tachart/tachartlistbox.pas b/components/tachart/tachartlistbox.pas index 0240b99cdb..6fe28d52ff 100644 --- a/components/tachart/tachartlistbox.pas +++ b/components/tachart/tachartlistbox.pas @@ -289,10 +289,6 @@ procedure TChartListbox.DrawItem( AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); { draws the listbox item } 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 = ( (tbCheckBoxUncheckedNormal, tbCheckBoxCheckedNormal), (tbRadioButtonUnCheckedNormal, tbRadioButtonCheckedNormal) @@ -316,13 +312,8 @@ begin if cloShowCheckboxes in Options then begin ch := Checked[AIndex]; - if ThemeServices.ThemesEnabled then begin - te := ThemeServices.GetElementDetails(THEMED_FLAGS[FCheckStyle, ch]); - ThemeServices.DrawElement(Canvas.Handle, te, rcb); - end - else - DrawFrameControl( - Canvas.Handle, rcb, DFC_BUTTON, UNTHEMED_FLAGS[FCheckStyle, ch]); + te := ThemeServices.GetElementDetails(THEMED_FLAGS[FCheckStyle, ch]); + ThemeServices.DrawElement(Canvas.Handle, te, rcb); x := rcb.Right; end else