mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
ui polish: center header elements, highlight active preset section, longer piano decay, remove unused PNGs
This commit is contained in:
parent
dc9e973340
commit
ce37b9a2a5
7 changed files with 32 additions and 18 deletions
|
|
@ -23,7 +23,6 @@ juce_add_binary_data(ChromaFlockBinaryData
|
||||||
NAMESPACE BinaryData
|
NAMESPACE BinaryData
|
||||||
SOURCES
|
SOURCES
|
||||||
bg.png
|
bg.png
|
||||||
cf3d.png
|
|
||||||
newlogo.png
|
newlogo.png
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ void ComboBoxLookAndFeel::drawPopupMenuItem(juce::Graphics& g, const juce::Recta
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Persistent highlight for the currently selected (ticked) entry
|
// Persistent highlight for the currently selected (ticked) entry or section
|
||||||
if (isTicked && !isHighlighted) {
|
if (isTicked && !isHighlighted) {
|
||||||
g.setColour(juce::Colour(0xffccaa44).withAlpha(0.3f));
|
g.setColour(juce::Colour(0xffccaa44).withAlpha(0.3f));
|
||||||
g.fillRoundedRectangle(area.reduced(2).toFloat(), 3.0f);
|
g.fillRoundedRectangle(area.reduced(2).toFloat(), 3.0f);
|
||||||
|
|
@ -660,9 +660,12 @@ void MainContentComponent::showPresetMenu() {
|
||||||
auto categories = processorRef.presetManager.getCategories();
|
auto categories = processorRef.presetManager.getCategories();
|
||||||
|
|
||||||
juce::String currentName;
|
juce::String currentName;
|
||||||
|
juce::String currentCategory;
|
||||||
auto& allPresets = processorRef.presetManager.getPresets();
|
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;
|
currentName = allPresets[currentPresetIndex].name;
|
||||||
|
currentCategory = allPresets[currentPresetIndex].category;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto& cat : categories) {
|
for (auto& cat : categories) {
|
||||||
juce::PopupMenu subMenu;
|
juce::PopupMenu subMenu;
|
||||||
|
|
@ -672,7 +675,8 @@ void MainContentComponent::showPresetMenu() {
|
||||||
bool isCurrent = (preset.name == currentName);
|
bool isCurrent = (preset.name == currentName);
|
||||||
subMenu.addItem(static_cast<int>(menuOrder.size()), preset.name, true, isCurrent);
|
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),
|
menu.showMenuAsync(juce::PopupMenu::Options().withTargetComponent(&presetButton),
|
||||||
|
|
@ -959,19 +963,30 @@ void MainContentComponent::resized() {
|
||||||
reverbDampKnob.setBounds(1468, fx2KnobY, lfoKnobSize, lfoKnobSize);
|
reverbDampKnob.setBounds(1468, fx2KnobY, lfoKnobSize, lfoKnobSize);
|
||||||
reverbMixKnob.setBounds(1553, fx2KnobY, lfoKnobSize, lfoKnobSize);
|
reverbMixKnob.setBounds(1553, fx2KnobY, lfoKnobSize, lfoKnobSize);
|
||||||
|
|
||||||
// --- PRESET + SCALE ---
|
// --- PRESET + SCALE (vertically centered within top section, y: 0..128) ---
|
||||||
presetButton.setBounds(20, 8, 90, 28);
|
int headerH = 128;
|
||||||
randomizeButton.setBounds(20, 42, 90, 28);
|
int btnH = 28, btnGap = 8;
|
||||||
patchLCD.setBounds(118, 8, 360, 28);
|
int presetGroupH = btnH * 2 + btnGap;
|
||||||
prevPresetButton.setBounds(486, 8, 28, 28);
|
int presetStartY = (headerH - presetGroupH) / 2;
|
||||||
nextPresetButton.setBounds(518, 8, 28, 28);
|
presetButton.setBounds(20, presetStartY, 90, btnH);
|
||||||
octaveTransposeLabel.setBounds(1112, 10, 30, 20);
|
randomizeButton.setBounds(20, presetStartY + btnH + btnGap, 90, btnH);
|
||||||
octaveTransposeBox.setBounds(1142, 8, 64, 24);
|
|
||||||
semitoneTransposeLabel.setBounds(1214, 10, 32, 20);
|
|
||||||
semitoneTransposeBox.setBounds(1246, 8, 74, 24);
|
|
||||||
|
|
||||||
scaleLabel.setBounds(1520, 10, 42, 20);
|
int rowH = 28;
|
||||||
uiScaleBox.setBounds(1566, 8, 80, 24);
|
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
|
// Visualizer area
|
||||||
int vizY = 818;
|
int vizY = 818;
|
||||||
|
|
|
||||||
|
|
@ -1605,7 +1605,7 @@ private:
|
||||||
{"phaseOffset", 0.5f},
|
{"phaseOffset", 0.5f},
|
||||||
{"filterType", 0}, {"filterCutoff", 10000}, {"filterRes", 0.05f}, {"filterEnvAmt", 0.8f}, {"keyTrack", 0.95f},
|
{"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},
|
{"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},
|
{"pan", 0}, {"drive", 1.0f}, {"masterLevel", 0.8f},
|
||||||
{"pitchBendRange", 2},
|
{"pitchBendRange", 2},
|
||||||
{"distType", 0}, {"distAmount", 0}, {"distMix", 0},
|
{"distType", 0}, {"distAmount", 0}, {"distMix", 0},
|
||||||
|
|
|
||||||
BIN
cf.png
BIN
cf.png
Binary file not shown.
|
Before Width: | Height: | Size: 230 KiB |
BIN
cf3d.png
BIN
cf3d.png
Binary file not shown.
|
Before Width: | Height: | Size: 116 KiB |
BIN
logo.png
BIN
logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 250 KiB |
BIN
shot.png
BIN
shot.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB |
Loading…
Add table
Add a link
Reference in a new issue