win32: refactor checks in WM_NCPAINT to avoid redundancy

git-svn-id: trunk@52630 -
This commit is contained in:
blikblum 2016-07-05 12:10:46 +00:00
parent 38240c91fc
commit df4030e5cf

View File

@ -2407,8 +2407,8 @@ begin
end;
WM_NCPAINT:
begin
if (lWinControl <> nil) and TWin32ThemeServices(ThemeServices).ThemesEnabled and
not (lWinControl is TCustomForm) and (lWinControl is TCustomControl) then
if TWin32ThemeServices(ThemeServices).ThemesEnabled and
(lWinControl is TCustomControl) and not (lWinControl is TCustomForm) then
begin
TWin32ThemeServices(ThemeServices).PaintBorder(lWinControl, True);
LMessage.Result := 0;