mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 17:50:19 +02:00
win32: don't perform any logic in DrawFrameControl - just call the windows function. By Luiz Americo (issue #0015358)
git-svn-id: trunk@23230 -
This commit is contained in:
parent
ea9cf9905b
commit
b09f9f224a
@ -1178,21 +1178,8 @@ end;
|
||||
Draws a frame control of the specified type and style.
|
||||
------------------------------------------------------------------------------}
|
||||
function TWin32WidgetSet.DrawFrameControl(DC: HDC; const Rect: TRect; UType, UState: Cardinal): Boolean;
|
||||
var
|
||||
Flags: dword;
|
||||
begin
|
||||
// flat button border cannot be drawn by DrawFrameControl, draw ourselves
|
||||
if (UType = DFC_BUTTON) and ((UState and DFCS_FLAT) <> 0) then
|
||||
begin
|
||||
if (UState and DFCS_PUSHED) <> 0 then
|
||||
Flags := BDR_SUNKENOUTER
|
||||
else
|
||||
if (UState and DFCS_FLAT) <> 0 then Flags := 0
|
||||
else Flags := BDR_RAISEDINNER;
|
||||
Result := Boolean(Windows.DrawEdge(DC, @Rect, Flags, BF_RECT));
|
||||
end else begin
|
||||
Result := Boolean(Windows.DrawFrameControl(DC, @Rect, UType, UState));
|
||||
end;
|
||||
Result := Boolean(Windows.DrawFrameControl(DC, @Rect, UType, UState));
|
||||
end;
|
||||
|
||||
function TWin32WidgetSet.DrawFocusRect(DC: HDC; const Rect: TRect): boolean;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user