Alright. I think that would need to be fixed in nsLookAndFeel so the `appearance` based menu item sizing matches the native ones.(In reply to Morgan Reschenberg [:morgan] from comment #4) > (In reply to :Gijs (back Jan 4, 2022; he/him) from comment #3) > > We added additional padding and custom styling to the Windows 10 menus outside of HCM because folks felt the pre-existing stuff looked ugly and out-of-date and hard to use, so UX gave them a make-over. But that's all custom, win10(+)-specific styling. Menu styles on Windows are an almighty mess (cf. the different styles in notepad, the taskbar (it's even different between the active apps and the clock/notification area!), the desktop, MS Edge, ... the list is endless). > > Oof I didn't realise there was that much variation :o good to know! I was comparing them to the context menus in Edge and File Explorer, which have much more padding (like our non-HCM ones). I assumed those were "plain" native, but I guess not? Our menus or Edge's? Ours aren't "plain" native. I don't think Edge's are either. I can't speak to Win11 file explorer, as I haven't yet used Win11. > Is the menu I'm seeing an (unstyled) native menu, or is it a XUL one? Firefox's menus are always XUL-based, but we can either use the CSS `appearance` stuff to rely on `nsLookAndFeel` for sizing and colours (which in turn uses win32 APIs to request what size/colour a native menu would be, and can also do "glass" surfaces on Win7 etc.), or "just" custom-style things with CSS. For non-HCM themes on Windows 10 and higher, we choose the second option. For HCM themes, we do the former. > And if it's native, why doesn't it change between windows 10 and windows 11? We're relying on nsLookAndFeel, which relies on win32 APIs, and those APIs have been lying to us for, uh, a long time. I'm not really surprised they're still lying. It's why we're using custom styling outside of HCM because the results from the API are ... not great. > FWIW on Win 11, I'm getting very similar styling between context menus on the task bar, notification area, edge, file explorer, desktop, etc. all of which are different than ours. Interesting! I wonder if on Win11 we'd want to match that style even outside of HCM... > I'm less concerned about the Windows 10 appearance on windows 10 machines, given that it matches (or matches some of) the native app context menu for that OS version. I'm more concerned about the menu's appearance on Windows 11, where native menus have more padding/readability than the Windows 10 menu we seem to be using. Yep, that makes sense. I'll update the summary here for Windows 11 and move this to widget code where nsLookAndFeel updates would need to be made. :gcp, do you (or someone else working on Win11 / widget code) have cycles to investigate the Win11 styling and if there's new APIs we should use or some way to convince the old APIs to give us the right values?
Bug 1746499 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Morgan Reschenberg [:morgan] from comment #4) > (In reply to :Gijs (back Jan 4, 2022; he/him) from comment #3) > > We added additional padding and custom styling to the Windows 10 menus outside of HCM because folks felt the pre-existing stuff looked ugly and out-of-date and hard to use, so UX gave them a make-over. But that's all custom, win10(+)-specific styling. Menu styles on Windows are an almighty mess (cf. the different styles in notepad, the taskbar (it's even different between the active apps and the clock/notification area!), the desktop, MS Edge, ... the list is endless). > > Oof I didn't realise there was that much variation :o good to know! I was comparing them to the context menus in Edge and File Explorer, which have much more padding (like our non-HCM ones). I assumed those were "plain" native, but I guess not? Our menus or Edge's? Ours aren't "plain" native. I don't think Edge's are either. I can't speak to Win11 file explorer, as I haven't yet used Win11. > Is the menu I'm seeing an (unstyled) native menu, or is it a XUL one? Firefox's menus are always XUL-based, but we can either use the CSS `appearance` stuff to rely on `nsLookAndFeel` for sizing and colours (which in turn uses win32 APIs to request what size/colour a native menu would be, and can also do "glass" surfaces on Win7 etc.), or "just" custom-style things with CSS. For non-HCM themes on Windows 10 and higher, we choose the second option. For HCM themes, we do the former. > And if it's native, why doesn't it change between windows 10 and windows 11? We're relying on nsLookAndFeel, which relies on win32 APIs, and those APIs have been lying to us for, uh, a long time. I'm not really surprised they're still lying. It's why we're using custom styling outside of HCM because the results from the API are ... not great. > FWIW on Win 11, I'm getting very similar styling between context menus on the task bar, notification area, edge, file explorer, desktop, etc. all of which are different than ours. Interesting! I wonder if on Win11 we'd want to match that style even outside of HCM... > I'm less concerned about the Windows 10 appearance on windows 10 machines, given that it matches (or matches some of) the native app context menu for that OS version. I'm more concerned about the menu's appearance on Windows 11, where native menus have more padding/readability than the Windows 10 menu we seem to be using. Yep, that makes sense. I'll update the summary here for Windows 11 and move this to widget code where nsLookAndFeel updates would need to be made. :gcp, do you (or someone else working on Win11 / widget code) have cycles to investigate the Win11 styling and if there's new APIs we should use or some way to convince the old APIs to give us the right values?