Deskbar: Set sub-menus to menu font

Top level "menu" still uses be_plain_font, submenus use menu font.
Window submenus use menu font, but in super-expando mode they use
the plain font since they are on top level.

Change-Id: I704e9baa1ec46d1cbf7b9401ba4e49b5e2dff27c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7041
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
John Scipione
2023-10-18 08:25:01 +00:00
committed by Adrien Destugues
parent 554dc8b060
commit ac121994b1
6 changed files with 12 additions and 7 deletions
-2
View File
@@ -315,7 +315,6 @@ B_TRANSLATE_MARK_VOID("About this system")
}
#endif
shutdownMenu->SetFont(be_plain_font);
shutdownMenu->SetTargetForItems(be_app);
BMessage* message = new BMessage(kShutdownSystem);
@@ -655,7 +654,6 @@ TRecentsMenu::ResetTargets()
DeskbarMountMenu::DeskbarMountMenu(const char* name)
: BPrivate::MountMenu(name)
{
SetFont(be_plain_font);
}
-1
View File
@@ -432,7 +432,6 @@ void
TReplicantTray::ShowReplicantMenu(BPoint point)
{
BPopUpMenu* menu = new BPopUpMenu("", false, false);
menu->SetFont(be_plain_font);
// If clock is visible show the extended menu, otherwise show "Show clock"
-1
View File
@@ -63,7 +63,6 @@ TTeamMenu::TTeamMenu(TBarView* barView)
fBarView(barView)
{
SetItemMargins(0.0f, 0.0f, 0.0f, 0.0f);
SetFont(be_plain_font);
}
+6 -1
View File
@@ -512,7 +512,12 @@ TTeamMenuItem::_Init(BList* team, BBitmap* icon, char* name, char* signature,
fBarView = static_cast<TBarApp*>(be_app)->BarView();
BFont font(be_plain_font);
// use menu font (parent font not available yet)
menu_info info;
get_menu_info(&info);
BFont font;
font.SetFamilyAndStyle(info.f_family, info.f_style);
font.SetSize(info.font_size);
fLabelWidth = ceilf(font.StringWidth(name));
font_height fontHeight;
font.GetHeight(&fontHeight);
-1
View File
@@ -82,7 +82,6 @@ TWindowMenu::TWindowMenu(const BList* team, const char* signature)
void
TWindowMenu::AttachedToWindow()
{
SetFont(be_plain_font);
RemoveItems(0, CountItems(), true);
int32 miniCount = 0;
+6 -1
View File
@@ -272,7 +272,12 @@ TWindowMenuItem::_Init(const char* name)
TBarApp* app = static_cast<TBarApp*>(be_app);
fBitmap = app->FetchWindowIcon(fIsLocal, fIsMinimized);
BFont font(be_plain_font);
// use menu font (parent font not available yet)
menu_info info;
get_menu_info(&info);
BFont font;
font.SetFamilyAndStyle(info.f_family, info.f_style);
font.SetSize(info.font_size);
fLabelWidth = ceilf(font.StringWidth(name));
font_height fontHeight;
font.GetHeight(&fontHeight);