gtk: format code to determine check/radio state in DrawFrameControl for better readability

git-svn-id: trunk@23266 -
This commit is contained in:
blikblum 2009-12-25 10:00:38 +00:00
parent 991f66b576
commit 1b22f11d7f

View File

@ -2627,21 +2627,14 @@ var
else else
Shadow := GTK_SHADOW_OUT; //unchecked style Shadow := GTK_SHADOW_OUT; //unchecked style
if (DFCS_PUSHED and uState)<>0 then begin if (DFCS_PUSHED and uState)<>0 then
STATE := GTK_STATE_ACTIVE;//button pressed(GTK ignores disabled) State := GTK_STATE_ACTIVE //button pressed(GTK ignores disabled)
end else if (DFCS_INACTIVE and uState)<>0 then
else begin State := GTK_STATE_INSENSITIVE //button disabled
if (DFCS_INACTIVE and uState)<>0 then begin else if (DFCS_HOT and uState)<>0 then
State:=GTK_STATE_INSENSITIVE;//button disabled State := GTK_STATE_PRELIGHT // button enabled, special (e.g. mouse over)
end else else
if (DFCS_HOT and uState)<>0 then begin State := GTK_STATE_NORMAL; // button enabled, normal
// button enabled, special (e.g. mouse over)
State:=GTK_STATE_PRELIGHT;
end else begin
// button enabled, normal
State:=GTK_STATE_NORMAL;
end;
end;
aDC:=TGtkDeviceContext(DC); aDC:=TGtkDeviceContext(DC);
DCOrigin := aDC.Offset; DCOrigin := aDC.Offset;