mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 00:20:13 +02:00
fixed main menubar for windows clasic theme (issue #6950) from Martin Smat
git-svn-id: trunk@9332 -
This commit is contained in:
parent
e81c0f77a0
commit
15b9273998
@ -373,10 +373,12 @@ begin
|
||||
end;
|
||||
|
||||
function BackgroundColorMenu(const aSelected: boolean; const aInMainMenu: boolean): COLORREF;
|
||||
var IsFlatMenu: Windows.BOOL;
|
||||
begin
|
||||
if aSelected then
|
||||
Result := GetSysColor(COLOR_HIGHLIGHT)
|
||||
else if aInMainMenu and (GetSysColorBrush(COLOR_MENUBAR) <> 0) then // COLOR_MENUBAR is not supported on Windows version < XP
|
||||
// SPI_GETFLATMENU = 0x1022, it is not yet defined in the FPC
|
||||
else if aInMainMenu and (SystemParametersInfo($1022, 0, @IsFlatMenu, 0)) and IsFlatMenu then // COLOR_MENUBAR is not supported on Windows version < XP
|
||||
Result := GetSysColor(COLOR_MENUBAR)
|
||||
else
|
||||
Result := GetSysColor(COLOR_MENU);
|
||||
|
Loading…
Reference in New Issue
Block a user