WindowServer: Support Alt+Character menu shortcuts :^)

This patch adds support for opening menus via keyboard shortcuts.
Use an ampersand in a menu name to automatically create a keyboard
shortcut (Alt + the character following the ampersand.)

Menus with an Alt shortcut have a small underline under the shortcut
character for discoverability.
This commit is contained in:
Andreas Kling 2021-04-05 23:03:55 +02:00
commit d80fb6d9c0
Notes: sideshowbarker 2024-07-18 20:44:45 +09:00
6 changed files with 56 additions and 19 deletions

View file

@ -97,6 +97,8 @@ public:
bool hit_test(const Gfx::IntPoint&) const;
void open_menubar_menu(Menu&);
private:
void paint_simple_rect_shadow(Gfx::Painter&, const Gfx::IntRect&, const Gfx::Bitmap&) const;
void paint_notification_frame(Gfx::Painter&);