Skip to content

Commit

Permalink
Fix addVSlider() to use sliderWidth and sliderHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
cu committed Mar 5, 2020
1 parent f47d62e commit f8b1943
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions SevenDelay/source/editor.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// (c) 2020 Takamitsu Endo
//
// This file is part of CubicPadSynth.
// This file is part of SevenDelay.
//
// CubicPadSynth is free software: you can redistribute it and/or modify
// SevenDelay is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// CubicPadSynth is distributed in the hope that it will be useful,
// SevenDelay is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with CubicPadSynth. If not, see <https://www.gnu.org/licenses/>.
// along with SevenDelay. If not, see <https://www.gnu.org/licenses/>.

#include "editor.hpp"
#include "version.hpp"
Expand All @@ -33,6 +33,8 @@ Editor::Editor(void *controller) : PlugEditor(controller)
param = std::make_unique<Synth::GlobalParameter>();

fontSize = 14.0;
sliderWidth = 70.0f;
sliderHeight = 230.0f;

viewRect = ViewRect{0, 0, 960, 330};
setRect(viewRect);
Expand Down
4 changes: 2 additions & 2 deletions common/gui/plugeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ std::tuple<Slider *, CTextLabel *> PlugEditor::addVSlider(
UTF8StringPtr tooltip,
bool drawFromCenter)
{
auto right = left + 70.0f;
auto bottom = top + 230.0f;
auto right = left + sliderWidth;
auto bottom = top + sliderHeight;

auto slider = new Slider(
CRect(left, top, right, bottom), this, tag, top, bottom, nullptr, nullptr);
Expand Down

0 comments on commit f8b1943

Please sign in to comment.