Use consistent font when displaying menu equivalent keys on Haiku

* src/haiku_support.cc (DrawContent): Set plain font when
drawing key text.
This commit is contained in:
Po Lu 2022-01-30 05:20:15 +00:00
parent 310bcda934
commit 2886520160

View file

@ -1679,11 +1679,17 @@ class EmacsMenuItem : public BMenuItem
if (key)
{
BRect r = menu->Frame ();
int w = menu->StringWidth (key);
BRect r = Frame ();
int w;
menu->PushState ();
menu->ClipToRect (r);
menu->SetFont (be_plain_font);
w = menu->StringWidth (key);
menu->MovePenTo (BPoint (BE_RECT_WIDTH (r) - w - 4,
menu->PenLocation ().y));
menu->DrawString (key);
menu->PopState ();
}
}