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:
committed by
Adrien Destugues
parent
554dc8b060
commit
ac121994b1
@@ -315,7 +315,6 @@ B_TRANSLATE_MARK_VOID("About this system")
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
shutdownMenu->SetFont(be_plain_font);
|
|
||||||
shutdownMenu->SetTargetForItems(be_app);
|
shutdownMenu->SetTargetForItems(be_app);
|
||||||
|
|
||||||
BMessage* message = new BMessage(kShutdownSystem);
|
BMessage* message = new BMessage(kShutdownSystem);
|
||||||
@@ -655,7 +654,6 @@ TRecentsMenu::ResetTargets()
|
|||||||
DeskbarMountMenu::DeskbarMountMenu(const char* name)
|
DeskbarMountMenu::DeskbarMountMenu(const char* name)
|
||||||
: BPrivate::MountMenu(name)
|
: BPrivate::MountMenu(name)
|
||||||
{
|
{
|
||||||
SetFont(be_plain_font);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -432,7 +432,6 @@ void
|
|||||||
TReplicantTray::ShowReplicantMenu(BPoint point)
|
TReplicantTray::ShowReplicantMenu(BPoint point)
|
||||||
{
|
{
|
||||||
BPopUpMenu* menu = new BPopUpMenu("", false, false);
|
BPopUpMenu* menu = new BPopUpMenu("", false, false);
|
||||||
menu->SetFont(be_plain_font);
|
|
||||||
|
|
||||||
// If clock is visible show the extended menu, otherwise show "Show clock"
|
// If clock is visible show the extended menu, otherwise show "Show clock"
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ TTeamMenu::TTeamMenu(TBarView* barView)
|
|||||||
fBarView(barView)
|
fBarView(barView)
|
||||||
{
|
{
|
||||||
SetItemMargins(0.0f, 0.0f, 0.0f, 0.0f);
|
SetItemMargins(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
SetFont(be_plain_font);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -512,7 +512,12 @@ TTeamMenuItem::_Init(BList* team, BBitmap* icon, char* name, char* signature,
|
|||||||
|
|
||||||
fBarView = static_cast<TBarApp*>(be_app)->BarView();
|
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));
|
fLabelWidth = ceilf(font.StringWidth(name));
|
||||||
font_height fontHeight;
|
font_height fontHeight;
|
||||||
font.GetHeight(&fontHeight);
|
font.GetHeight(&fontHeight);
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ TWindowMenu::TWindowMenu(const BList* team, const char* signature)
|
|||||||
void
|
void
|
||||||
TWindowMenu::AttachedToWindow()
|
TWindowMenu::AttachedToWindow()
|
||||||
{
|
{
|
||||||
SetFont(be_plain_font);
|
|
||||||
RemoveItems(0, CountItems(), true);
|
RemoveItems(0, CountItems(), true);
|
||||||
int32 miniCount = 0;
|
int32 miniCount = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -272,7 +272,12 @@ TWindowMenuItem::_Init(const char* name)
|
|||||||
TBarApp* app = static_cast<TBarApp*>(be_app);
|
TBarApp* app = static_cast<TBarApp*>(be_app);
|
||||||
fBitmap = app->FetchWindowIcon(fIsLocal, fIsMinimized);
|
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));
|
fLabelWidth = ceilf(font.StringWidth(name));
|
||||||
font_height fontHeight;
|
font_height fontHeight;
|
||||||
font.GetHeight(&fontHeight);
|
font.GetHeight(&fontHeight);
|
||||||
|
|||||||
Reference in New Issue
Block a user