LCL: TCustomCheckCombo: simplified

git-svn-id: trunk@56559 -
This commit is contained in:
mattias 2017-11-30 14:59:27 +00:00
parent e0c22bcb0c
commit 1cf9140e46

View File

@ -599,7 +599,7 @@ begin { do not call inherited ! }
end; end;
aEnabled:=IsEnabled; aEnabled:=IsEnabled;
if not (csDesigning in ComponentState) then if not (csDesigning in ComponentState) then
aEnabled:= (aEnabled and TCheckComboItemState(Items.Objects[Index]).Enabled); aEnabled:= (aEnabled and ItemState.Enabled);
{$IF DEFINED(LCLWin32) or DEFINED(LCLWin64)} {$IF DEFINED(LCLWin32) or DEFINED(LCLWin64)}
aFocusedEditableMainItemNoDD := (Focused and (ARect.Left>0) and not aDropped); aFocusedEditableMainItemNoDD := (Focused and (ARect.Left>0) and not aDropped);
{$ELSE} {$ELSE}
@ -620,7 +620,7 @@ begin { do not call inherited ! }
Canvas.FillRect(ARect); Canvas.FillRect(ARect);
end; end;
if not (csDesigning in ComponentState) if not (csDesigning in ComponentState)
then aState:=TCheckComboItemState(Items.Objects[Index]).State then aState:=ItemState.State
else aState:=cbUnchecked; else aState:=cbUnchecked;
aDetail:=ThemeServices.GetElementDetails(caCheckThemes aDetail:=ThemeServices.GetElementDetails(caCheckThemes
[aEnabled, aState, not aDropped and FCheckHighlight]); [aEnabled, aState, not aDropped and FCheckHighlight]);