Browse Source

Use MenuSeparator instead of MenuEntry for separating menu items.

tags/v2.0.0
Andrew Belt 5 years ago
parent
commit
035a673155
7 changed files with 10 additions and 8 deletions
  1. +2
    -1
      src/app/MenuBar.cpp
  2. +3
    -2
      src/app/ModuleWidget.cpp
  3. +1
    -1
      src/core/AudioInterface.cpp
  4. +1
    -1
      src/core/CV_Gate.cpp
  5. +1
    -1
      src/core/CV_MIDI.cpp
  6. +1
    -1
      src/core/MIDI_CV.cpp
  7. +1
    -1
      src/core/MIDI_Gate.cpp

+ 2
- 1
src/app/MenuBar.cpp View File

@@ -4,6 +4,7 @@
#include <asset.hpp>
#include <ui/Button.hpp>
#include <ui/MenuItem.hpp>
#include <ui/MenuSeparator.hpp>
#include <ui/SequentialLayout.hpp>
#include <ui/Slider.hpp>
#include <ui/TextField.hpp>
@@ -709,7 +710,7 @@ struct LibraryMenu : ui::Menu {
addChild(syncItem);

if (plugin::hasUpdates()) {
addChild(new ui::MenuEntry);
addChild(new ui::MenuSeparator);

ui::MenuLabel* updatesLabel = new ui::MenuLabel;
updatesLabel->text = "Updates";


+ 3
- 2
src/app/ModuleWidget.cpp View File

@@ -3,6 +3,7 @@
#include <engine/Engine.hpp>
#include <plugin/Plugin.hpp>
#include <app/SvgPanel.hpp>
#include <ui/MenuSeparator.hpp>
#include <system.hpp>
#include <asset.hpp>
#include <helpers.hpp>
@@ -235,12 +236,12 @@ struct ModulePresetItem : ui::MenuItem {
};

// Scan `<user dir>/presets/<plugin slug>/<module slug>` for presets.
menu->addChild(new MenuEntry);
menu->addChild(new ui::MenuSeparator);
menu->addChild(createMenuLabel("User presets"));
createPresetItems(asset::user("presets/" + moduleWidget->model->plugin->slug + "/" + moduleWidget->model->slug));

// Scan `<plugin dir>/presets/<module slug>` for presets.
menu->addChild(new MenuEntry);
menu->addChild(new ui::MenuSeparator);
menu->addChild(createMenuLabel("Factory presets"));
createPresetItems(asset::plugin(moduleWidget->model->plugin, "presets/" + moduleWidget->model->slug));



+ 1
- 1
src/core/AudioInterface.cpp View File

@@ -367,7 +367,7 @@ struct AudioInterfaceWidget : ModuleWidget {
void appendContextMenu(Menu* menu) override {
TAudioInterface* module = dynamic_cast<TAudioInterface*>(this->module);

menu->addChild(new MenuEntry);
menu->addChild(new MenuSeparator);

PrimaryModuleItem<TAudioInterface>* primaryModuleItem = new PrimaryModuleItem<TAudioInterface>;
primaryModuleItem->text = "Primary audio module";


+ 1
- 1
src/core/CV_Gate.cpp View File

@@ -205,7 +205,7 @@ struct CV_GateWidget : ModuleWidget {
void appendContextMenu(Menu* menu) override {
CV_Gate* module = dynamic_cast<CV_Gate*>(this->module);

menu->addChild(new MenuEntry);
menu->addChild(new MenuSeparator);
CV_GateVelocityItem* velocityItem = createMenuItem<CV_GateVelocityItem>("Velocity mode", CHECKMARK(module->velocityMode));
velocityItem->module = module;
menu->addChild(velocityItem);


+ 1
- 1
src/core/CV_MIDI.cpp View File

@@ -175,7 +175,7 @@ struct CV_MIDIWidget : ModuleWidget {
void appendContextMenu(Menu* menu) override {
CV_MIDI* module = dynamic_cast<CV_MIDI*>(this->module);

menu->addChild(new MenuEntry);
menu->addChild(new MenuSeparator);

CV_MIDIPanicItem* panicItem = new CV_MIDIPanicItem;
panicItem->text = "Panic";


+ 1
- 1
src/core/MIDI_CV.cpp View File

@@ -573,7 +573,7 @@ struct MIDI_CVWidget : ModuleWidget {
void appendContextMenu(Menu* menu) override {
MIDI_CV* module = dynamic_cast<MIDI_CV*>(this->module);

menu->addChild(new MenuEntry);
menu->addChild(new MenuSeparator);

ClockDivisionItem* clockDivisionItem = new ClockDivisionItem;
clockDivisionItem->text = "CLK/N divider";


+ 1
- 1
src/core/MIDI_Gate.cpp View File

@@ -211,7 +211,7 @@ struct MIDI_GateWidget : ModuleWidget {
void appendContextMenu(Menu* menu) override {
MIDI_Gate* module = dynamic_cast<MIDI_Gate*>(this->module);

menu->addChild(new MenuEntry);
menu->addChild(new MenuSeparator);
MIDI_GateVelocityItem* velocityItem = createMenuItem<MIDI_GateVelocityItem>("Velocity mode", CHECKMARK(module->velocityMode));
velocityItem->module = module;
menu->addChild(velocityItem);


Loading…
Cancel
Save