mirror of
https://codeberg.org/armin/terion.git
synced 2026-10-11 16:41:53 +02:00
many UI fixes and new screenshot
This commit is contained in:
parent
5904430490
commit
88ed77a0c6
8 changed files with 43 additions and 29 deletions
|
|
@ -47,7 +47,7 @@ TerionProcessorEditor::TerionProcessorEditor(TerionProcessor& p)
|
|||
|
||||
// Freeze button
|
||||
addAndMakeVisible(freezeButton);
|
||||
freezeButton.setButtonText("FRZ");
|
||||
freezeButton.setButtonText("Freeze");
|
||||
freezeButton.setColour(juce::ToggleButton::textColourId, juce::Colour(0xff888899));
|
||||
freezeButton.setColour(juce::ToggleButton::tickColourId, juce::Colour(0xff7ecfcf));
|
||||
freezeAttachment = std::make_unique<juce::AudioProcessorValueTreeState::ButtonAttachment>(
|
||||
|
|
@ -55,7 +55,7 @@ TerionProcessorEditor::TerionProcessorEditor(TerionProcessor& p)
|
|||
|
||||
// Mono button
|
||||
addAndMakeVisible(monoButton);
|
||||
monoButton.setButtonText("MONO");
|
||||
monoButton.setButtonText("Mono");
|
||||
monoButton.setColour(juce::ToggleButton::textColourId, juce::Colour(0xff888899));
|
||||
monoButton.setColour(juce::ToggleButton::tickColourId, juce::Colour(0xff7ecfcf));
|
||||
monoAttachment = std::make_unique<juce::AudioProcessorValueTreeState::ButtonAttachment>(
|
||||
|
|
@ -133,10 +133,10 @@ void TerionProcessorEditor::paint(juce::Graphics& g)
|
|||
g.setColour(juce::Colour(0xff555566));
|
||||
g.setFont(juce::Font(juce::FontOptions(9.0f * s)));
|
||||
|
||||
juce::String footerText = "Terion "
|
||||
juce::String footerText = "Terion (Git: "
|
||||
+ juce::String(TERION_GIT_HASH)
|
||||
+ " | " + juce::String(TERION_BUILD_TIME)
|
||||
+ " | " + juce::String(TERION_GIT_LOCAL_COMMITS) + " local";
|
||||
+ ", " + juce::String(TERION_GIT_DIRTY)
|
||||
+ ") | built: " + juce::String(TERION_BUILD_TIME);
|
||||
|
||||
g.drawFittedText(footerText, footer.reduced(static_cast<int>(10.0f * s), 0),
|
||||
juce::Justification::centredLeft, 1);
|
||||
|
|
@ -149,20 +149,18 @@ void TerionProcessorEditor::resized()
|
|||
const int knobs = static_cast<int>(kKnobSize * s);
|
||||
const int margin = static_cast<int>(kKnobMargin * s);
|
||||
const int scaleW = static_cast<int>(76.0f * s);
|
||||
const int monoW = static_cast<int>(72.0f * s);
|
||||
const int gap = static_cast<int>(8.0f * s);
|
||||
|
||||
auto bounds = getLocalBounds();
|
||||
auto footer = bounds.removeFromBottom(footerH);
|
||||
|
||||
// Footer: scale dropdown + mono toggle on the right
|
||||
scaleBox.setBounds(footer.getWidth() - scaleW, 1, scaleW, footerH - 2);
|
||||
monoButton.setBounds(footer.getWidth() - scaleW - monoW, 1, monoW, footerH - 2);
|
||||
// Footer: scale dropdown with an 8px gap on the top and right
|
||||
scaleBox.setBounds(footer.getWidth() - scaleW - gap, gap, scaleW, footerH - 2 - gap);
|
||||
|
||||
// Scope fills the remaining area
|
||||
scope.setBounds(bounds);
|
||||
|
||||
// Controls layout: knob row sits 8px above the footer, FRZ stays top-right
|
||||
const int gap = static_cast<int>(8.0f * s);
|
||||
// Controls layout: knob row sits 8px above the footer, Freeze/Mono stay top-right
|
||||
const int numKnobs = 5;
|
||||
const int rowH = knobs + static_cast<int>(12.0f * s) - static_cast<int>(6.0f * s);
|
||||
const int startX = bounds.getWidth() - (numKnobs * (knobs + margin) + knobs + margin);
|
||||
|
|
@ -173,8 +171,11 @@ void TerionProcessorEditor::resized()
|
|||
dotSizeKnob.setBounds(startX + 2 * (knobs + margin), startY, knobs, knobs);
|
||||
smoothingKnob.setBounds(startX + 3 * (knobs + margin), startY, knobs, knobs);
|
||||
afterglowKnob.setBounds(startX + 4 * (knobs + margin), startY, knobs, knobs);
|
||||
freezeButton.setBounds(bounds.getWidth() - knobs - margin, static_cast<int>(20.0f * s),
|
||||
knobs, knobs - static_cast<int>(20.0f * s));
|
||||
const int freezeY = static_cast<int>(20.0f * s);
|
||||
const int freezeH = knobs - static_cast<int>(20.0f * s);
|
||||
freezeButton.setBounds(bounds.getWidth() - knobs - margin, freezeY, knobs, freezeH);
|
||||
monoButton.setBounds(bounds.getWidth() - knobs - margin, freezeY + freezeH + gap,
|
||||
knobs, freezeH);
|
||||
|
||||
const int labelY = startY + knobs - static_cast<int>(6.0f * s);
|
||||
const int labelH = static_cast<int>(12.0f * s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue