@@ -184,6 +184,10 @@ PlayModeSubPanel::PlayModeSubPanel(SixSinesEditor &e) : HasEditor(e)
184184 addAndMakeVisible (*panicButton);
185185 addAndMakeVisible (*panicTitle);
186186
187+ outputControlTitle = std::make_unique<jcmp::RuledLabel>();
188+ outputControlTitle->setText (" Output Control" );
189+ addAndMakeVisible (*outputControlTitle);
190+
187191 createComponent (editor, *this , editor.patchCopy .output .sampleRateStrategy , srStrat, srStratD);
188192 addAndMakeVisible (*srStrat);
189193 createComponent (editor, *this , editor.patchCopy .output .resampleEngine , rsEng, rsEngD);
@@ -199,61 +203,67 @@ void PlayModeSubPanel::resized()
199203{
200204 namespace jlo = sst::jucegui::layouts;
201205 auto skinny = uicKnobSize + 30 ;
202- auto playRowHeight =
203- uicTitleLabelInnerBox + 2 * uicLabelHeight + uicMargin + 5 * uicLabelHeight + 6 * uicMargin;
204206
205- auto outer = jlo::HList ().at (uicMargin, 0 ).withAutoGap (2 * uicMargin);
207+ // Top section: 4 columns, each split into a top sub-section and a bottom sub-section
208+ // col1: Voices / Unison
209+ // col2: Play (mode + triggers + porta)
210+ // col3: Bend / Octave
211+ // col4: MPE / Panic
212+ // The two tallest columns (1 and 2) drive the row height.
213+ auto topRowHeight = uicTitleLabelInnerBox + 7 * uicLabelHeight + 7 * uicMargin;
214+
215+ auto outer = jlo::VList ().at (uicMargin, 0 ).withAutoGap (2 * uicMargin);
216+
217+ auto topRow = jlo::HList ().withHeight (topRowHeight).withAutoGap (2 * uicMargin);
206218
207- // Column 1: voices / bend / octave / mpe / panic
208219 auto col1 = jlo::VList ().withWidth (skinny).withAutoGap (uicMargin);
209220 col1.add (titleLabelGaplessLayout (voiceLimitL));
210221 col1.add (jlo::Component (*voiceLimit).withHeight (uicLabelHeight));
211- col1.add (titleLabelGaplessLayout (bendTitle));
212- col1.add (sideLabel (bUpL, bUp));
213- col1.add (sideLabel (bDnL, bDn));
214- col1.add (titleLabelGaplessLayout (tsposeTitle));
215- col1.add (jlo::Component (*tsposeButton).withHeight (uicLabelHeight));
216- col1.add (titleLabelGaplessLayout (mpeTitle));
217- col1.add (jlo::Component (*mpeActiveButton).withHeight (uicLabelHeight));
218- col1.add (jlo::Component (*mpeRange).withHeight (uicLabelHeight));
219- col1.add (jlo::Component (*mpeRangeL).withHeight (uicLabelHeight));
220- col1.add (titleLabelGaplessLayout (panicTitle));
221- col1.add (jlo::Component (*panicButton).withHeight (uicLabelHeight));
222- outer.add (col1);
223-
224- // Column 2: play + unison on top, oversampling below
225- auto col2 = jlo::VList ().withWidth (2 * skinny + 2 * uicMargin).withAutoGap (2 * uicMargin);
226-
227- auto topRow = jlo::HList ().withHeight (playRowHeight).withAutoGap (2 * uicMargin);
228-
229- auto pml = jlo::VList ().withWidth (skinny).withAutoGap (uicMargin);
230- pml.add (titleLabelGaplessLayout (playTitle));
231- pml.add (jlo::Component (*playMode).withHeight (2 * uicLabelHeight + uicMargin));
232- pml.add (jlo::Component (*triggerButton).withHeight (uicLabelHeight));
233- pml.add (jlo::Component (*pianoModeButton).withHeight (uicLabelHeight));
234- pml.add (jlo::Component (*portaL).withHeight (uicLabelHeight));
235- pml.add (jlo::Component (*portaTime).withHeight (uicLabelHeight).insetBy (0 , 2 ));
236- pml.add (jlo::Component (*portaContinuationButton).withHeight (uicLabelHeight));
237- topRow.add (pml);
238-
239- auto uml = jlo::VList ().withWidth (skinny).withAutoGap (uicMargin);
240- uml.add (titleLabelGaplessLayout (uniTitle));
241- uml.add (jlo::Component (*uniCt).withHeight (uicLabelHeight));
242- uml.add (jlo::Component (*uniCtL).withHeight (uicLabelHeight));
243- uml.add (jlo::Component (*uniRPhase).withHeight (uicLabelHeight));
244- uml.add (sideLabelSlider (uniSpreadG, uniSpread));
245- uml.add (sideLabelSlider (uniPanG, uniPan));
246- topRow.add (uml);
247-
248- col2.add (topRow);
249-
250- auto rsl = jlo::VList ().withAutoGap (uicMargin);
222+ col1.add (titleLabelGaplessLayout (uniTitle));
223+ col1.add (jlo::Component (*uniCt).withHeight (uicLabelHeight));
224+ col1.add (jlo::Component (*uniCtL).withHeight (uicLabelHeight));
225+ col1.add (jlo::Component (*uniRPhase).withHeight (uicLabelHeight));
226+ col1.add (sideLabelSlider (uniSpreadG, uniSpread));
227+ col1.add (sideLabelSlider (uniPanG, uniPan));
228+ topRow.add (col1);
229+
230+ auto col2 = jlo::VList ().withWidth (skinny).withAutoGap (uicMargin);
231+ col2.add (titleLabelGaplessLayout (playTitle));
232+ col2.add (jlo::Component (*playMode).withHeight (2 * uicLabelHeight + uicMargin));
233+ col2.add (jlo::Component (*triggerButton).withHeight (uicLabelHeight));
234+ col2.add (jlo::Component (*pianoModeButton).withHeight (uicLabelHeight));
235+ col2.add (jlo::Component (*portaL).withHeight (uicLabelHeight));
236+ col2.add (jlo::Component (*portaTime).withHeight (uicLabelHeight).insetBy (0 , 2 ));
237+ col2.add (jlo::Component (*portaContinuationButton).withHeight (uicLabelHeight));
238+ topRow.add (col2);
239+
240+ auto col3 = jlo::VList ().withWidth (skinny).withAutoGap (uicMargin);
241+ col3.add (titleLabelGaplessLayout (bendTitle));
242+ col3.add (sideLabel (bUpL, bUp));
243+ col3.add (sideLabel (bDnL, bDn));
244+ col3.add (titleLabelGaplessLayout (tsposeTitle));
245+ col3.add (jlo::Component (*tsposeButton).withHeight (uicLabelHeight));
246+ topRow.add (col3);
247+
248+ auto col4 = jlo::VList ().withWidth (skinny).withAutoGap (uicMargin);
249+ col4.add (titleLabelGaplessLayout (mpeTitle));
250+ col4.add (jlo::Component (*mpeActiveButton).withHeight (uicLabelHeight));
251+ col4.add (jlo::Component (*mpeRange).withHeight (uicLabelHeight));
252+ col4.add (jlo::Component (*mpeRangeL).withHeight (uicLabelHeight));
253+ col4.add (titleLabelGaplessLayout (panicTitle));
254+ col4.add (jlo::Component (*panicButton).withHeight (uicLabelHeight));
255+ topRow.add (col4);
256+
257+ outer.add (topRow);
258+
259+ auto bottomWidth = 4 * skinny + 3 * 2 * uicMargin;
260+ outer.add (titleLabelGaplessLayout (outputControlTitle).withWidth (bottomWidth));
261+
262+ auto rsl = jlo::VList ().withWidth (bottomWidth).withAutoGap (uicMargin);
251263 rsl.add (titleLabelGaplessLayout (srStratLab));
252264 rsl.add (jlo::Component (*srStrat).withHeight (uicLabelHeight));
253265 rsl.add (jlo::Component (*rsEng).withHeight (uicLabelHeight));
254- col2.add (rsl);
255-
256- outer.add (col2);
266+ outer.add (rsl);
257267
258268 outer.doLayout ();
259269}
0 commit comments