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