In my opinion the main goal should be to achieve parity with the OS, which obviously has been neglected in the menu/toolbar area because for a long time Office was seen as having the superior style. I don't know if there is much value maintaining the historic Office rendering styles beyond providing it for backward compatibility to existing WinForms users. Its been a long time since Office had menus and the OS has caught up and now has its own theming and UI styling rules separate from Office. (On the native side MFC had similar classes to replicate the more modern look and feel of Office, separately of the OS controls.) The point was that at that time Office was the reference application when you wanted modern UI and it was moving at a faster pace than the OS, so WinForms probably wanted to allow taking part of that modern look and feel. you have the "ProfessionalRenderer" which I think is based on Office (back when it still had menus).You might have to invest some work to reproduce the "theming on" style. you have the "theming on" style which is whatever the OS does natively, but I don't know if you can reproduce that in WinForms without using the deprecated HMENU based classes.you have the "theming off" style which is entirely based on SystemColors (you still get that sometimes over remote connections or server farms).If I remember right the general idea is that From a quick look you have no renderer using the theming API for menus/toolbars/statusbars (but I may have missed something). Some colors may be reused by theming, but the general model I have in mind is that theming uses a lot of hardcoded colors and rendering code which you only can get by going through the theming API. I'm not entirely sure if SystemColors (and SystemRenderer) will properly reflect theming. It's a lot ^.^ but it should make them almost completely visually indistinguishable from native controls. Currently the highlight lingers until the sub-menu disappears (see last screenshot).After highlighting an item with a sub-menu and then moving cursor to a sibling item above/below, the original highlighted item should immediately become unhighlighted.Sub-menus should overlap their parent menu item by 6 pixels on the left, and be flush with the top.Checkmark should have a background color RGB(144, 200, 246) when checked, or RGB(86, 176, 250) when checked and highlighted at the same time.Fix splitter padding (it should not leak into the checkmark/image column, and be 2px from the right border).Update icon of arrow on items with sub-menus and move it up by 1 px to center it.Increase padding between the items and border (1px -> 2px). ![]() Fix the weird white line on the left of highlighted items.Set highlighted item background color to RGB(144, 200, 246).Set checkmark/image column background color to RGB(240, 240, 240).Set overall background color to RGB(242, 242, 242), so that non-highlighted items and padding between items and border is this color.Reduce left/right padding of menu items (appears to be 1px for border + (6px * DPI) of padding). ![]() Do not invert text color of highlighted items.Set highlighted item border to 1px of RGB(153, 209, 255).Set highlighted item background to RGB(204, 232, 255).Note that item highlight overlays the bottom border and the top of sub-menus is just below the bottom border.The menu background from top to bottom is (19px * DPI - 1px) of RGB(255, 255, 255), and then 1px bottom border of RGB(242, 242, 242). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |