diff --git a/include/ui/Menu.hpp b/include/ui/Menu.hpp index a33605d6..192c06c2 100644 --- a/include/ui/Menu.hpp +++ b/include/ui/Menu.hpp @@ -13,6 +13,7 @@ struct Menu : widget::OpaqueWidget { Menu* childMenu = NULL; /** The entry which created the child menu */ MenuEntry* activeEntry = NULL; + BNDcornerFlags cornerFlags = BND_CORNER_NONE; Menu(); ~Menu(); diff --git a/src/app/MenuBar.cpp b/src/app/MenuBar.cpp index a7d5003b..9209fbcb 100644 --- a/src/app/MenuBar.cpp +++ b/src/app/MenuBar.cpp @@ -67,6 +67,7 @@ struct NotificationIcon : widget::Widget { struct FileButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); + menu->cornerFlags = BND_CORNER_TOP; menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); menu->addChild(createMenuItem("New", RACK_MOD_CTRL_NAME "+N", []() { @@ -117,6 +118,7 @@ struct FileButton : MenuButton { struct EditButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); + menu->cornerFlags = BND_CORNER_TOP; menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); struct UndoItem : ui::MenuItem { @@ -326,6 +328,7 @@ struct HaloBrightnessSlider : ui::Slider { struct ViewButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); + menu->cornerFlags = BND_CORNER_TOP; menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); menu->addChild(createBoolPtrMenuItem("Show tooltips", &settings::tooltips)); @@ -439,6 +442,7 @@ struct SampleRateItem : ui::MenuItem { struct EngineButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); + menu->cornerFlags = BND_CORNER_TOP; menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); std::string cpuMeterText = "F3"; @@ -708,6 +712,7 @@ struct LibraryButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); + menu->cornerFlags = BND_CORNER_TOP; menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); } @@ -741,6 +746,7 @@ struct HelpButton : MenuButton { void onAction(const ActionEvent& e) override { ui::Menu* menu = createMenu(); + menu->cornerFlags = BND_CORNER_TOP; menu->box.pos = getAbsoluteOffset(math::Vec(0, box.size.y)); menu->addChild(createMenuItem("Tips", "", [=]() { diff --git a/src/ui/Menu.cpp b/src/ui/Menu.cpp index 57eeb573..990c2a84 100644 --- a/src/ui/Menu.cpp +++ b/src/ui/Menu.cpp @@ -54,7 +54,7 @@ void Menu::step() { } void Menu::draw(const DrawArgs& args) { - bndMenuBackground(args.vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_NONE); + bndMenuBackground(args.vg, 0.0, 0.0, box.size.x, box.size.y, cornerFlags); Widget::draw(args); }