Browse Source

Rename Toolbar to MenuBar.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
53274088be
5 changed files with 12 additions and 16 deletions
  1. +2
    -6
      include/app/MenuBar.hpp
  2. +2
    -2
      include/app/Scene.hpp
  3. +1
    -1
      include/rack.hpp
  4. +3
    -3
      src/app/MenuBar.cpp
  5. +4
    -4
      src/app/Scene.cpp

include/app/Toolbar.hpp → include/app/MenuBar.hpp View File

@@ -7,12 +7,8 @@ namespace rack {
namespace app {


struct Toolbar : widget::OpaqueWidget {
// TODO Move these to future Rack app state
float cableOpacity = 0.5;
float cableTension = 0.5;

Toolbar();
struct MenuBar : widget::OpaqueWidget {
MenuBar();
void draw(const DrawArgs &args) override;
};


+ 2
- 2
include/app/Scene.hpp View File

@@ -3,7 +3,7 @@
#include "widget/OpaqueWidget.hpp"
#include "app/RackScrollWidget.hpp"
#include "app/RackWidget.hpp"
#include "app/Toolbar.hpp"
#include "app/MenuBar.hpp"


namespace rack {
@@ -14,7 +14,7 @@ struct Scene : widget::OpaqueWidget {
// Convenience variables for accessing important widgets
RackScrollWidget *rackScroll;
RackWidget *rack;
Toolbar *toolbar;
MenuBar *menuBar;
widget::Widget *moduleBrowser;

// Version checking


+ 1
- 1
include/rack.hpp View File

@@ -65,7 +65,7 @@
#include "app/SvgScrew.hpp"
#include "app/SvgSlider.hpp"
#include "app/SvgSwitch.hpp"
#include "app/Toolbar.hpp"
#include "app/MenuBar.hpp"
#include "app/CableWidget.hpp"

#include "engine/Engine.hpp"


src/app/Toolbar.cpp → src/app/MenuBar.cpp View File

@@ -1,4 +1,4 @@
#include "app/Toolbar.hpp"
#include "app/MenuBar.hpp"
#include "window.hpp"
#include "engine/Engine.hpp"
#include "asset.hpp"
@@ -680,7 +680,7 @@ struct HelpButton : MenuButton {
};


Toolbar::Toolbar() {
MenuBar::MenuBar() {
const float margin = 5;
box.size.y = BND_WIDGET_HEIGHT + 2*margin;

@@ -714,7 +714,7 @@ Toolbar::Toolbar() {
layout->addChild(helpButton);
}

void Toolbar::draw(const DrawArgs &args) {
void MenuBar::draw(const DrawArgs &args) {
bndMenuBackground(args.vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_ALL);
bndBevel(args.vg, 0.0, 0.0, box.size.x, box.size.y);


+ 4
- 4
src/app/Scene.cpp View File

@@ -21,9 +21,9 @@ Scene::Scene() {

rack = rackScroll->rackWidget;

toolbar = new Toolbar;
addChild(toolbar);
rackScroll->box.pos.y = toolbar->box.size.y;
menuBar = new MenuBar;
addChild(menuBar);
rackScroll->box.pos.y = menuBar->box.size.y;

moduleBrowser = moduleBrowserCreate();
moduleBrowser->hide();
@@ -35,7 +35,7 @@ Scene::~Scene() {

void Scene::step() {
// Resize owned descendants
toolbar->box.size.x = box.size.x;
menuBar->box.size.x = box.size.x;
rackScroll->box.size = box.size.minus(rackScroll->box.pos);

// Autosave every 15 seconds


Loading…
Cancel
Save