BMenuItem: use unicode character for B_SPACE shortcut
Change-Id: If3e9b1232538f50e15fb8f5b249a7584f23a46db Reviewed-on: https://review.haiku-os.org/c/haiku/+/6360 Reviewed-by: Stefano Ceccherini <[email protected]> Reviewed-by: Adrien Destugues <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
@@ -52,6 +52,7 @@ const char* kUTF8ControlMap[] = {
|
||||
"\xe2\x86\x92", /* B_RIGHT_ARROW */
|
||||
"\xe2\x86\x91", /* B_UP_ARROW */
|
||||
"\xe2\x86\x93", /* B_DOWN_ARROW */
|
||||
"\xe2\x90\xA3" /* B_SPACE */
|
||||
};
|
||||
|
||||
|
||||
@@ -759,7 +760,7 @@ BMenuItem::_DrawShortcutSymbol(bool submenus)
|
||||
where.x -= fBounds.Height() / 2;
|
||||
|
||||
const float ascent = MenuPrivate(fSuper).Ascent();
|
||||
if (fShortcutChar < B_SPACE && kUTF8ControlMap[(int)fShortcutChar])
|
||||
if (fShortcutChar <= B_SPACE && kUTF8ControlMap[(int)fShortcutChar])
|
||||
_DrawControlChar(fShortcutChar, where + BPoint(0, ascent));
|
||||
else
|
||||
fSuper->DrawChar(fShortcutChar, where + BPoint(0, ascent));
|
||||
|
||||
Reference in New Issue
Block a user