QWindowsKeyMapper: simplify the code a bit (2/2)
The default menu item will appear in bold font, and calling SetMenuDefaultItem() can do the job for us. Use it instead of calling SetMenuItemInfo() to save some typings. Change-Id: Ifa834adc45f3aafd67077c089fb4e7b5d3fd3e02 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
0d7b8a0d9e
commit
67c835d201
|
|
@ -798,11 +798,7 @@ static void showSystemMenu(QWindow* w)
|
|||
HiliteMenuItem(topLevelHwnd, menu, SC_RESTORE, MF_BYCOMMAND | MFS_HILITE);
|
||||
|
||||
// Set bold on close menu item
|
||||
MENUITEMINFO closeItem;
|
||||
closeItem.cbSize = sizeof(MENUITEMINFO);
|
||||
closeItem.fMask = MIIM_STATE;
|
||||
closeItem.fState = MFS_DEFAULT;
|
||||
SetMenuItemInfo(menu, SC_CLOSE, FALSE, &closeItem);
|
||||
SetMenuDefaultItem(menu, SC_CLOSE, FALSE);
|
||||
|
||||
#undef enabled
|
||||
#undef disabled
|
||||
|
|
|
|||
Loading…
Reference in New Issue