ui polish: center header elements, highlight active preset section, longer piano decay, remove unused PNGs

This commit is contained in:
Armin 2026-07-14 14:17:39 +02:00
commit ce37b9a2a5
7 changed files with 32 additions and 18 deletions

View file

@ -23,7 +23,6 @@ juce_add_binary_data(ChromaFlockBinaryData
NAMESPACE BinaryData
SOURCES
bg.png
cf3d.png
newlogo.png
)

View file

@ -130,7 +130,7 @@ void ComboBoxLookAndFeel::drawPopupMenuItem(juce::Graphics& g, const juce::Recta
return;
}
// Persistent highlight for the currently selected (ticked) entry
// Persistent highlight for the currently selected (ticked) entry or section
if (isTicked && !isHighlighted) {
g.setColour(juce::Colour(0xffccaa44).withAlpha(0.3f));
g.fillRoundedRectangle(area.reduced(2).toFloat(), 3.0f);
@ -660,9 +660,12 @@ void MainContentComponent::showPresetMenu() {
auto categories = processorRef.presetManager.getCategories();
juce::String currentName;
juce::String currentCategory;
auto& allPresets = processorRef.presetManager.getPresets();
if (currentPresetIndex >= 0 && currentPresetIndex < static_cast<int>(allPresets.size()))
if (currentPresetIndex >= 0 && currentPresetIndex < static_cast<int>(allPresets.size())) {
currentName = allPresets[currentPresetIndex].name;
currentCategory = allPresets[currentPresetIndex].category;
}
for (auto& cat : categories) {
juce::PopupMenu subMenu;
@ -672,7 +675,8 @@ void MainContentComponent::showPresetMenu() {
bool isCurrent = (preset.name == currentName);
subMenu.addItem(static_cast<int>(menuOrder.size()), preset.name, true, isCurrent);
}
menu.addSubMenu(cat, subMenu);
// Tick the section that contains the active patch (cleared when randomize -> index -1)
menu.addSubMenu(cat, subMenu, true, juce::Image(), cat == currentCategory);
}
menu.showMenuAsync(juce::PopupMenu::Options().withTargetComponent(&presetButton),
@ -959,19 +963,30 @@ void MainContentComponent::resized() {
reverbDampKnob.setBounds(1468, fx2KnobY, lfoKnobSize, lfoKnobSize);
reverbMixKnob.setBounds(1553, fx2KnobY, lfoKnobSize, lfoKnobSize);
// --- PRESET + SCALE ---
presetButton.setBounds(20, 8, 90, 28);
randomizeButton.setBounds(20, 42, 90, 28);
patchLCD.setBounds(118, 8, 360, 28);
prevPresetButton.setBounds(486, 8, 28, 28);
nextPresetButton.setBounds(518, 8, 28, 28);
octaveTransposeLabel.setBounds(1112, 10, 30, 20);
octaveTransposeBox.setBounds(1142, 8, 64, 24);
semitoneTransposeLabel.setBounds(1214, 10, 32, 20);
semitoneTransposeBox.setBounds(1246, 8, 74, 24);
// --- PRESET + SCALE (vertically centered within top section, y: 0..128) ---
int headerH = 128;
int btnH = 28, btnGap = 8;
int presetGroupH = btnH * 2 + btnGap;
int presetStartY = (headerH - presetGroupH) / 2;
presetButton.setBounds(20, presetStartY, 90, btnH);
randomizeButton.setBounds(20, presetStartY + btnH + btnGap, 90, btnH);
scaleLabel.setBounds(1520, 10, 42, 20);
uiScaleBox.setBounds(1566, 8, 80, 24);
int rowH = 28;
int rowY = (headerH - rowH) / 2;
patchLCD.setBounds(118, rowY, 360, rowH);
prevPresetButton.setBounds(486, rowY, 28, rowH);
nextPresetButton.setBounds(518, rowY, 28, rowH);
int comboH2 = 24, labelH2 = 20;
int comboY2 = (headerH - comboH2) / 2;
int labelY2 = (headerH - labelH2) / 2;
octaveTransposeLabel.setBounds(1112, labelY2, 30, labelH2);
octaveTransposeBox.setBounds(1142, comboY2, 64, comboH2);
semitoneTransposeLabel.setBounds(1214, labelY2, 32, labelH2);
semitoneTransposeBox.setBounds(1246, comboY2, 74, comboH2);
scaleLabel.setBounds(1520, labelY2, 42, labelH2);
uiScaleBox.setBounds(1566, comboY2, 80, comboH2);
// Visualizer area
int vizY = 818;

View file

@ -1605,7 +1605,7 @@ private:
{"phaseOffset", 0.5f},
{"filterType", 0}, {"filterCutoff", 10000}, {"filterRes", 0.05f}, {"filterEnvAmt", 0.8f}, {"keyTrack", 0.95f},
{"fEnvAttack", 0.001f}, {"fEnvDecay", 0.06f}, {"fEnvSustain", 0.0f}, {"fEnvRelease", 0.04f},
{"envAttack", 0.001f}, {"envDecay", 0.08f}, {"envSustain", 0.0f}, {"envRelease", 0.06f},
{"envAttack", 0.001f}, {"envDecay", 2.5f}, {"envSustain", 0.0f}, {"envRelease", 0.2f},
{"pan", 0}, {"drive", 1.0f}, {"masterLevel", 0.8f},
{"pitchBendRange", 2},
{"distType", 0}, {"distAmount", 0}, {"distMix", 0},

BIN
cf.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

BIN
cf3d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 KiB

BIN
shot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB