From 930c500988f9c646df21e9aad0d881d343363acc Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Mon, 2 Aug 2021 12:12:54 -0500 Subject: [PATCH] (libinterface) Better-looking and functioning MenuButton --- libs/libinterface/MenuButton.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/libinterface/MenuButton.cpp b/libs/libinterface/MenuButton.cpp index 636b70d..e70667c 100644 --- a/libs/libinterface/MenuButton.cpp +++ b/libs/libinterface/MenuButton.cpp @@ -10,9 +10,10 @@ MenuButton::MenuButton(const char* name, const char* label, BMessage* message) : - BButton(name, BString(label).Append(" ▾"), message), + BButton(name, label, message), fMenu(NULL) { + SetBehavior(B_POP_UP_BEHAVIOR); } @@ -21,7 +22,7 @@ MenuButton::MouseDown(BPoint where) { BButton::MouseDown(where); if (fMenu != NULL) - fMenu->Go(ConvertToScreen(where), true, true, true); + fMenu->Go(ConvertToScreen(Bounds().LeftBottom()), true, true, true); }