BMenuItem: draw checkmark on marked item in matrix-layout menus

Fixes #18990

Change-Id: Id2f3b78bb443b8f76ab0bdde4318ddfd95d283bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8038
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
PulkoMandy 2024-08-15 09:27:50 +02:00 committed by nephele nephele
parent 950900a9e8
commit c251e4e13b

View File

@ -473,10 +473,12 @@ BMenuItem::Draw()
// draw extra symbols
MenuPrivate privateAccessor(fSuper);
const menu_layout layout = privateAccessor.Layout();
if (layout == B_ITEMS_IN_COLUMN) {
if (layout != B_ITEMS_IN_ROW) {
if (IsMarked())
_DrawMarkSymbol();
}
if (layout == B_ITEMS_IN_COLUMN) {
if (fShortcutChar)
_DrawShortcutSymbol(privateAccessor.HasSubmenus());