mirror of
https://codeberg.org/armin/monoslicer.git
synced 2026-09-01 12:10:46 +02:00
Move scroll buttons to title bar, add build info status bar
- Replace broken bottom waveform scroll buttons with title bar < > buttons - Add scrollLeft()/scrollRight() methods to WaveformDisplay - Add status bar showing git branch, commit, dirty state, and build timestamp - Inject git version info via CMake at configure time - Enable COPY_PLUGIN_AFTER_BUILD - Increase baseHeight by 20px for status bar
This commit is contained in:
parent
9b7c973622
commit
93c8c73399
5 changed files with 93 additions and 24 deletions
|
|
@ -24,6 +24,8 @@ MonoslicerEditor::MonoslicerEditor(MonoslicerProcessor& p)
|
|||
setupTitleBtn(zoomInButton, "Zoom In");
|
||||
setupTitleBtn(zoomOutButton, "Zoom Out");
|
||||
setupTitleBtn(zoomResetButton, "Reset Zoom");
|
||||
setupTitleBtn(scrollLeftButton, "Scroll waveform left");
|
||||
setupTitleBtn(scrollRightButton, "Scroll waveform right");
|
||||
|
||||
addAndMakeVisible(scaleComboBox);
|
||||
scaleComboBox.addItem("75%", 1);
|
||||
|
|
@ -55,6 +57,14 @@ MonoslicerEditor::MonoslicerEditor(MonoslicerProcessor& p)
|
|||
|
||||
addAndMakeVisible(waveformDisplay);
|
||||
|
||||
// Status bar
|
||||
addAndMakeVisible(statusBar);
|
||||
statusBar.setText("Build: " GIT_VERSION " (" __DATE__ ", " __TIME__ ")",
|
||||
juce::dontSendNotification);
|
||||
statusBar.setColour(juce::Label::textColourId, juce::Colour(0xff666688));
|
||||
statusBar.setFont(juce::Font(juce::FontOptions(11.0f)));
|
||||
statusBar.setJustificationType(juce::Justification::centredRight);
|
||||
|
||||
// Slice knobs
|
||||
attachSlider(bassSlider, bassLabel, "Bass", "bass", bassAttachment);
|
||||
attachSlider(trebleSlider, trebleLabel, "Treble", "treble", trebleAttachment);
|
||||
|
|
@ -197,6 +207,8 @@ MonoslicerEditor::~MonoslicerEditor()
|
|||
zoomInButton.removeListener(this);
|
||||
zoomOutButton.removeListener(this);
|
||||
zoomResetButton.removeListener(this);
|
||||
scrollLeftButton.removeListener(this);
|
||||
scrollRightButton.removeListener(this);
|
||||
stretchButton.removeListener(this);
|
||||
}
|
||||
|
||||
|
|
@ -242,6 +254,8 @@ void MonoslicerEditor::resized()
|
|||
|
||||
auto bounds = getLocalBounds();
|
||||
auto titleBar = bounds.removeFromTop(40);
|
||||
auto statusBarArea = bounds.removeFromBottom(18).withTrimmedRight(5);
|
||||
statusBar.setBounds(statusBarArea);
|
||||
|
||||
int tx = 120;
|
||||
|
||||
|
|
@ -263,6 +277,9 @@ void MonoslicerEditor::resized()
|
|||
placeBtn(zoomOutButton, 28);
|
||||
placeBtn(zoomResetButton, 32);
|
||||
placeBtn(zoomInButton, 28);
|
||||
tx += 6;
|
||||
placeBtn(scrollLeftButton, 24);
|
||||
placeBtn(scrollRightButton, 24);
|
||||
|
||||
scaleComboBox.setBounds(titleBar.getRight() - 100, titleBar.getY() + 8, 90, 24);
|
||||
octaveComboBox.setBounds(titleBar.getRight() - 176, titleBar.getY() + 8, 72, 24);
|
||||
|
|
@ -446,6 +463,14 @@ void MonoslicerEditor::buttonClicked(juce::Button* button)
|
|||
{
|
||||
waveformDisplay.zoomReset();
|
||||
}
|
||||
else if (button == &scrollLeftButton)
|
||||
{
|
||||
waveformDisplay.scrollLeft();
|
||||
}
|
||||
else if (button == &scrollRightButton)
|
||||
{
|
||||
waveformDisplay.scrollRight();
|
||||
}
|
||||
}
|
||||
|
||||
void MonoslicerEditor::comboBoxChanged(juce::ComboBox* comboBoxThatHasChanged)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue