win32: draw disabled toolbutton text as gray (issue #0023197)

git-svn-id: trunk@41644 -
This commit is contained in:
paul 2013-06-10 02:25:03 +00:00
parent a17f69a025
commit 7fd7d1a57d

View File

@ -500,7 +500,13 @@ begin
Exit;
end;
if ThemesEnabled then
DrawText(TCanvas(ACanvas).Handle, Details, S, R, Flags, Flags2)
begin
// windows does not paint disabled toolbar text properly - the only way is
// to fix it here with disabled button text
if (Details.Element = teToolBar) and (Details.State = TS_DISABLED) then
Details := GetElementDetails(tbPushButtonDisabled);
DrawText(TCanvas(ACanvas).Handle, Details, S, R, Flags, Flags2);
end
else
inherited;
end;