diff --git a/docs/M6-GUI-REFINEMENT.md b/docs/M6-GUI-REFINEMENT.md new file mode 100644 index 0000000..450383f --- /dev/null +++ b/docs/M6-GUI-REFINEMENT.md @@ -0,0 +1,27 @@ +# M6 — proportional controls and coherent typography + +Engineering outcome: preserve ArSonComp's compact 612×500 window (minimum 580×480, MINI 320 tall), black-glass LCD, premium knob assets, 46 factory presets and native Windows ASIO. No audio DSP, parameter schema, buffering or worker changes. + +## Root cause and corrective geometry + +The image resources are **340×57 track** and **58×124 thumb**. The earlier nine-slice rendering stretched a 30-pixel plate through a narrow control slot and separately forced the thumb to 18×37. This broke the relative artwork proportions and made the narrow sliders appear flattened. + +`FaderGeometry::calculate()` now chooses **one scale** bounded by (control width−8)/340 and (control height−4)/124, uses it on both complete images, and places the red progress recess behind the thumb. The track and thumb preserve their true aspect ratios regardless of 580/612/704/1000 width. Original transparent PNG assets still decode once in LookAndFeel on GUI initialization. No new cache allocations or DSP operations. Source dimensions are asserted in regression tests. + +## Alignment and UX + +The main seven-knob row has centrally aligned 10.4-point captions, 7+ pixels of actual empty space above the metal knobs, and 58-pixel knob drag targets. Slider labels have a separate 4+ pixel vertical gap; the fader control box is 34 px high, rather than a 40px box with a stretched 30px plate. Dynamics and Sidechain both use the same geometry and balanced baselines. 'Mini', 'Full', 'File', 'Dynamics', and 'Sidechain' use title case; A/B remains unchanged. Consistent 11-point header buttons, 10.4-point captions and 9.5-point overline typography, with a native crisp wordmark legible on dark metal. + +The functional black LCD graph, meter, preset browser, hover readout and sidechain device controls retain their positions/behavior. The input of the real-time compressor is independent of these paint-only modifications. + +## Automated validation + +JUCE smoke checks (1) exact image resource dimensions, (2) proportional artwork ratios at 70–150px slider widths and 34/40px heights, (3) meter/thumb red movement, (4) 7 main knobs/captions are separated, (5) all 4 Dynamics fader captions separated, (6) both Sidechain fader captions separated, (7) title-case controls, and (8) prior full/MINI resize, hit target, preset and ASIO tests. Keep the existing Linux engine safety and Windows VST3/Standalone checks. + +## Physical acceptance still needed + +Screenshot review at 612×500 / 580×480 / MINI, Windows 100%/125%/150% DPI and mouse hit-testing. PS22 crackle investigations and musical-compressor preset loudness remain independent release gates. Reference: FabFilter Pro-C 3 uses a separate Compact and resizable workflow; JUCE Graphics supports explicit aspect-preserving rendering. This patch does not copy protected graphics or proprietary DSP. + +## Windows screenshot refinement + +Actual Windows CI screenshots confirmed aspect ratio and caption spacing, but the Dynamics plate appeared too thin because the native track is almost 6:1. A separate 23px-deep painted gunmetal housing is now rendered BEHIND the proportional track. The full track and thumb retain their exact native aspect ratios and independent red fill. The housing is bounded within each slider's 34px control, adds no bitmap decoding/worker and is regression-tested through a real JUCE LookAndFeel screenshot pixel. This is deliberate visual review before release, not another audio-engine modification. diff --git a/plugin/Editor.cpp b/plugin/Editor.cpp index abf7b7a..865d8ef 100644 --- a/plugin/Editor.cpp +++ b/plugin/Editor.cpp @@ -5,6 +5,7 @@ #include "SurfacePaint.h" #include "GraphHistory.h" #include "HeaderLayout.h" +#include "FaderGeometry.h" #include "BinaryData.h" #include #include @@ -59,13 +60,6 @@ CompLook::CompLook() { BinaryData::gunmetal_slider_thumb_red_png, static_cast(BinaryData::gunmetal_slider_thumb_red_pngSize)); jassert(sliderTrack.isValid() && sliderThumb.isValid()); - if(sliderTrack.isValid()) { - constexpr int cap=37; - const int width=sliderTrack.getWidth(),height=sliderTrack.getHeight(); - sliderCapLeft=sliderTrack.getClippedImage({0,0,cap,height}); - sliderCentre=sliderTrack.getClippedImage({cap,0,width-2*cap,height}); - sliderCapRight=sliderTrack.getClippedImage({width-cap,0,cap,height}); - } setColour(juce::Slider::textBoxTextColourId,text); setColour(juce::Slider::textBoxBackgroundColourId,juce::Colour{0xff111417}); setColour(juce::Slider::textBoxOutlineColourId,juce::Colour{0xff31383e}); @@ -86,6 +80,9 @@ CompLook::CompLook() { juce::Colour{arson::ui::EditorMetrics::controlCaptionRgb}); } // Satin-finished combo surfaces: recessed but legible on a brushed chassis. +juce::Font CompLook::getTextButtonFont(juce::TextButton&,int) { + return juce::Font(juce::FontOptions(arson::ui::EditorMetrics::buttonFont)); +} void CompLook::drawComboBox(juce::Graphics& g,int width,int height,bool down, int buttonX,int buttonY,int buttonW,int buttonH, juce::ComboBox& box) { @@ -113,7 +110,7 @@ void CompLook::drawComboBox(juce::Graphics& g,int width,int height,bool down, } void CompLook::positionComboBoxText(juce::ComboBox& box,juce::Label& label) { label.setBounds(11,1,juce::jmax(0,box.getWidth()-36),box.getHeight()-2); - label.setFont(juce::FontOptions(11.5f)); + label.setFont(juce::FontOptions(arson::ui::EditorMetrics::buttonFont)); label.setJustificationType(juce::Justification::centredLeft); } void CompLook::drawButtonBackground(juce::Graphics& g,juce::Button& button, @@ -208,61 +205,81 @@ void CompLook::drawRotarySlider(juce::Graphics& g,int x,int y,int w,int h, void CompLook::drawLinearSlider(juce::Graphics& g,int x,int y,int w,int h, float pos,float,float, const juce::Slider::SliderStyle,juce::Slider&) { - const float cy=static_cast(y)+static_cast(h)*0.50f; - const float plateX=static_cast(x)+2.0f; - const float plateW=static_cast(w)-4.0f; - constexpr float plateH=30.0f; - // Photo plate is stationary. Nine-slice horizontally (3 segments) - // preserves realistic endcaps at both the short and 170px SC sliders. + // Draw the *whole* 340x57 track and the 58x124 thumb at the SAME + // proportional scale. A resized window changes size, not aspect ratio. + // All geometry is float arithmetic; there is no allocation/cache churn. + const auto geometry=arson::ui::FaderGeometry::calculate( + static_cast(w),static_cast(h),pos); + const auto track=geometry.track.translated(static_cast(x), + static_cast(y)); + const auto thumb=geometry.thumb.translated(static_cast(x), + static_cast(y)); + const float cy=static_cast(y)+static_cast(h)*0.5f; + const float left=geometry.left+static_cast(x); + const float right=geometry.right+static_cast(x); + const float position=geometry.position+static_cast(x); + // The native track art is intentionally ~6:1. At an 85px control + // it becomes just 14px tall. A bounded *independent* metal housing + // restores the physical fader's depth without stretching either PNG. + // All geometry stays within the component; no image/cache allocation. + const float housingH=juce::jmin(23.0f,static_cast(h)-6.0f); + const auto housing=juce::Rectangle{ + track.getX()-3.0f,cy-housingH*0.5f,track.getWidth()+6.0f,housingH}; + g.setColour(juce::Colour{0xff262c31}); + g.fillRoundedRectangle(housing,4.5f); + g.setColour(juce::Colour{0xff717a80}.withAlpha(0.42f)); + g.drawRoundedRectangle(housing.reduced(0.5f),4.5f,0.9f); + g.setColour(juce::Colours::white.withAlpha(0.085f)); + g.drawHorizontalLine(juce::roundToInt(housing.getY()+2.5f), + housing.getX()+5.0f,housing.getRight()-5.0f); if(sliderTrack.isValid()) { - constexpr float dstCap=18.0f; - const float top=cy-plateH*0.5f; - const float midW=juce::jmax(0.0f,plateW-2.0f*dstCap); g.setImageResamplingQuality(juce::Graphics::highResamplingQuality); - // JUCE 8's Graphics::drawImage takes a target Rectangle and optional - // RectanglePlacement, NOT a source Rectangle. Preclip these three - // views once in CompLook constructor, never inside paint(). - g.drawImage(sliderCapLeft, - juce::Rectangle{plateX,top,dstCap,plateH}); - g.drawImage(sliderCentre, - juce::Rectangle{plateX+dstCap,top,midW,plateH}); - g.drawImage(sliderCapRight, - juce::Rectangle{plateX+plateW-dstCap,top,dstCap,plateH}); + g.drawImage(sliderTrack,track); } else { - g.setColour(juce::Colour{0xff282d31}); - g.fillRoundedRectangle(plateX,cy-14.0f,plateW,28.0f,7.0f); + g.setColour(juce::Colour{0xff292f33}); + g.fillRoundedRectangle(track,track.getHeight()*0.35f); } - - // Use the same travel limits for the bright level and moving thumb. - // The LED is INSIDE the dark photo slot, not a red slider drawn - // over the brushed metal. At minimum it is genuinely extinguished. - const float left=static_cast(x)+21.0f; - const float right=static_cast(x+w)-21.0f; - const float cx=juce::jlimit(left,right,pos); - if(cx>left+0.3f) { + // Recessed LED level remains clipped inside the proportional track + // and always uses the same thumb travel. Minimum has no red fill. + if(position>left+0.3f) { juce::Graphics::ScopedSaveState scope(g); - juce::Path slot; - slot.addRoundedRectangle(left,cy-4.0f,right-left,8.0f,3.2f); - g.reduceClipRegion(slot); - g.setColour(juce::Colour{0xff922731}.withAlpha(0.40f)); - g.fillRoundedRectangle(left,cy-4.0f,cx-left,8.0f,3.5f); + const float ledH=juce::jmax(3.0f,track.getHeight()*0.29f); + const float ledY=cy-ledH*0.5f; + juce::Path recess; + recess.addRoundedRectangle(left,ledY,right-left,ledH,ledH*0.45f); + g.reduceClipRegion(recess); g.setGradientFill(juce::ColourGradient( - juce::Colour{0xffff6774}.withAlpha(0.98f),left,cy-2.6f, - juce::Colour{0xffa62038}.withAlpha(0.90f),left,cy+3.5f,false)); - g.fillRoundedRectangle(left,cy-2.8f,cx-left,5.6f,2.8f); - g.setColour(juce::Colour{0xffff9197}.withAlpha(0.55f)); - g.fillRect(left,cy-0.7f,cx-left,1.4f); + juce::Colour{0xffff6b79},left,ledY, + juce::Colour{0xff9e2433},left,ledY+ledH,false)); + g.fillRect(left,ledY,position-left,ledH); + g.setColour(juce::Colour{0xffffb0b6}.withAlpha(0.46f)); + g.fillRect(left,cy-0.55f,position-left,1.1f); } - // The thumb is the FRONT layer. Only its x position moves with the - // JUCE slider value; the chassis, glass and audio thread never move. + // A proportional photographic thumb is too dark against the new chassis + // at 580-612px. Give it a bright metal silhouette and a tactile centre + // marker UNDER/OVER the original asset (never stretch or replace it). + // This makes the current value visible even when the LED fill is zero. + const auto thumbBack=thumb.expanded(1.2f,0.4f); + g.setColour(juce::Colour{0xffabb6bb}); + g.fillRoundedRectangle(thumbBack,2.5f); + g.setColour(juce::Colour{0xff11181c}); + g.fillRoundedRectangle(thumbBack.reduced(1.1f),2.0f); if(sliderThumb.isValid()) { g.setImageResamplingQuality(juce::Graphics::highResamplingQuality); - g.drawImage(sliderThumb, - juce::Rectangle{cx-9.0f,cy-18.5f,18.0f,37.0f}); + g.drawImage(sliderThumb,thumb); } else { - g.setColour(juce::Colour{0xffa8afb1}); - g.fillRoundedRectangle(cx-8.0f,cy-17.0f,16.0f,34.0f,4.0f); + g.setColour(juce::Colour{0xff929fa5}); + g.fillRoundedRectangle(thumb,2.5f); } + // Draw a narrow light-catching ridge over the image. The centre marker + // must move with thumb at both extremes and at all supported widths. + const float ridgeX=thumb.getCentreX(); + g.setColour(juce::Colour{0xffc8d0d2}.withAlpha(0.9f)); + g.drawVerticalLine(juce::roundToInt(ridgeX),thumb.getY()+3.0f, + thumb.getBottom()-3.0f); + g.setColour(juce::Colour{0xff5f6a70}.withAlpha(0.8f)); + g.drawVerticalLine(juce::roundToInt(ridgeX+2.0f), + thumb.getY()+4.0f,thumb.getBottom()-4.0f); } void CompLook::drawToggleButton(juce::Graphics& g,juce::ToggleButton& button, bool highlighted,bool down) { @@ -286,9 +303,9 @@ void CompLook::drawToggleButton(juce::Graphics& g,juce::ToggleButton& button, // The sprite already says ON/OFF; the adjacent caption identifies // the affected compressor function without repeating that state. const juce::String caption=bypassControl - ? (active?"ACTIVE":"BYPASS") : button.getButtonText(); + ? (active?"Active":"Bypass") : button.getButtonText(); g.setColour(juce::Colour{0xffe3e6e5}); - g.setFont(juce::FontOptions(9.4f)); + g.setFont(juce::FontOptions(10.0f)); g.drawText(caption,0,0,juce::jmax(0,static_cast(tx)-5), button.getHeight(),juce::Justification::centredRight,false); if(highlighted||down) { @@ -299,12 +316,8 @@ void CompLook::drawToggleButton(juce::Graphics& g,juce::ToggleButton& button, Editor::Editor(Processor& p):AudioProcessorEditor(p),processor(p),alternate(p.snapshot()) { setLookAndFeel(&look); setOpaque(true); - // One-time UI-thread decode of the high-contrast brushed embossed wordmark. - // Embedded via BinaryData: no runtime file I/O or audio impact. - headerLogo=juce::ImageFileFormat::loadFrom( - BinaryData::arsoncomp_header_logo_png, - static_cast(BinaryData::arsoncomp_header_logo_pngSize)); - jassert(headerLogo.isValid()); + // Crisp vector-font wordmark replaces a low-contrast bitmap in the + // tight 88px header; photo knob/slider assets remain predecoded. const std::array bars{{arson::Range,arson::Hold,arson::Mix, arson::Link,arson::Highpass,arson::Lowpass}}; for(std::size_t i=0;i(k)*cell; - labels[i].setBounds(x,mainY+3,cell,17); - knobs[i].setBounds(x+3,mainY+20,cell-6,62); + labels[i].setBounds(x,mainY+arson::ui::EditorMetrics::knobCaptionOffset, + cell,15); + knobs[i].setBounds(x+3,mainY+arson::ui::EditorMetrics::knobTopOffset, + cell-6,arson::ui::EditorMetrics::knobHeight); } const int bottomY=compactMode?166: @@ -836,15 +856,17 @@ void Editor::resized() { dynamicsTab.setBounds(16,bottomY+1,92,23); sidechainTab.setBounds(114,bottomY+1,94,23); // Main tab: four comfortable controls, plus a dedicated AUTO control. - const int slot=(w-190)/4; + const int slot=(w-176)/4; constexpr std::array dynamics{arson::Range,arson::Hold, arson::Mix,arson::Link}; for(std::size_t k=0;k(k)*slot; - labels[i].setBounds(x,bottomY+25,slot-10,15); - knobs[i].setBounds(x+5,bottomY+38,slot-18,40); + const auto i=dynamics[k];const int x=14+static_cast(k)*slot; + labels[i].setBounds(x,bottomY+arson::ui::EditorMetrics::faderCaptionOffset, + slot-5,14); + knobs[i].setBounds(x+3,bottomY+arson::ui::EditorMetrics::faderTopOffset, + slot-10,arson::ui::EditorMetrics::faderHeight); } - autoRelease.setBounds(w-153,bottomY+42,139,28); + autoRelease.setBounds(w-145,bottomY+46,132,27); // Sidechain tab: only detector-specific controls are painted. constexpr std::array filters{arson::Highpass,arson::Lowpass}; @@ -859,13 +881,15 @@ void Editor::resized() { const int filterStart=16; for(std::size_t k=0;k(k)*filterSlot; - labels[i].setBounds(x,bottomY+25,filterSlot-8,15); - knobs[i].setBounds(x+2,bottomY+38,filterSlot-8,40); + labels[i].setBounds(x,bottomY+arson::ui::EditorMetrics::faderCaptionOffset, + filterSlot-8,14); + knobs[i].setBounds(x+2,bottomY+arson::ui::EditorMetrics::faderTopOffset, + filterSlot-8,arson::ui::EditorMetrics::faderHeight); } const int detX=filterStart+filterSlot*2+8; - detector.setBounds(detX,bottomY+43,detW,27); - external.setBounds(detX+detW+8,bottomY+42,extW,30); - listen.setBounds(detX+detW+extW+16,bottomY+42,listenW,30); + detector.setBounds(detX,bottomY+47,detW,27); + external.setBounds(detX+detW+8,bottomY+46,extW,28); + listen.setBounds(detX+detW+extW+16,bottomY+46,listenW,28); const int readoutW=juce::jmin(254,w-40); graphCanvas.setBounds(compactMode ? juce::Rectangle{13,258,w-26,47} : display); @@ -1058,19 +1082,17 @@ void Editor::paint(juce::Graphics& g) { g.fillRect(0,0,getWidth(),arson::ui::EditorMetrics::headerHeight); // Single-line embossed brand and a quiet, consistent overline hierarchy. const auto header=arson::ui::HeaderLayout::calculate(getWidth()); - if(headerLogo.isValid()) { - g.setImageResamplingQuality(juce::Graphics::highResamplingQuality); - g.drawImageWithin(headerLogo,header.logo.getX(),header.logo.getY(), - header.logo.getWidth(),header.logo.getHeight(), - juce::RectanglePlacement::centred); - } else { - g.setColour(text); - g.setFont(juce::FontOptions(17.0f)); - g.drawText("ArSonComp",header.logo,juce::Justification::centredLeft); - } + // Same crisp native font for the brand, toolbar and controls. + // The previous dark embossed bitmap became illegible at 612px. + g.setFont(juce::FontOptions(14.0f)); + g.setColour(juce::Colours::black.withAlpha(0.48f)); + g.drawText("ArSonComp",header.logo.translated(0,1), + juce::Justification::centredLeft,true); + g.setColour(juce::Colour{0xffd6dee1}); + g.drawText("ArSonComp",header.logo,juce::Justification::centredLeft,true); // Labels only for dropdowns; the other buttons identify themselves. g.setColour(juce::Colour{arson::ui::EditorMetrics::captionRgb}); - g.setFont(juce::FontOptions(9.5f)); + g.setFont(juce::FontOptions(arson::ui::EditorMetrics::headerCaptionFont)); const auto caption=[&g](const char* title,const juce::Rectangle& r) { g.drawText(title,r.getX()+1,7,r.getWidth()-2,12, juce::Justification::centredLeft,false); diff --git a/plugin/Editor.h b/plugin/Editor.h index a8e2f91..970764c 100644 --- a/plugin/Editor.h +++ b/plugin/Editor.h @@ -11,6 +11,7 @@ class CompLook final : public juce::LookAndFeel_V4 { void positionComboBoxText(juce::ComboBox&,juce::Label&) override; void drawButtonBackground(juce::Graphics&,juce::Button&, const juce::Colour&,bool,bool) override; + juce::Font getTextButtonFont(juce::TextButton&,int) override; juce::Label* createSliderTextBox(juce::Slider&) override; void drawRotarySlider(juce::Graphics&,int,int,int,int,float,float,float,juce::Slider&) override; void drawLinearSlider(juce::Graphics&,int,int,int,int,float,float,float, @@ -22,7 +23,6 @@ class CompLook final : public juce::LookAndFeel_V4 { juce::Image sourceFace; // decoded once on GUI initialization juce::Image toggleOn, toggleOff; // matched, predecoded state sprites juce::Image sliderTrack, sliderThumb; // layered photographic gunmetal assets, decoded once - juce::Image sliderCapLeft, sliderCentre, sliderCapRight; // pre-clipped once; no per-paint allocations const juce::Image& knobFace(int diameter,bool primary); }; class Editor final : public juce::AudioProcessorEditor, private juce::Timer { @@ -128,7 +128,6 @@ class Editor final : public juce::AudioProcessorEditor, private juce::Timer { int currentChannels=2; juce::Rectangle display; juce::Image grid,metalSurface; // cached full chassis and black glass LCD - juce::Image headerLogo; // cropped transparent metal/LED brand mark, decoded once juce::Path transferCurve,transferShade; juce::Path inputHistory,outputHistory,reductionHistory,reductionArea; // Six cached horizontal gradient brushes: input, output, GR, transfer, diff --git a/plugin/FaderGeometry.h b/plugin/FaderGeometry.h new file mode 100644 index 0000000..57ce144 --- /dev/null +++ b/plugin/FaderGeometry.h @@ -0,0 +1,30 @@ +#pragma once +#include +#include + +namespace arson::ui { +// One uniform image scale for BOTH components of the physical fader. +// The artwork is 340x57 (track) and 58x124 (thumb). Never compress the +// track height or stretch the thumb just to fill a short JUCE slot. +struct FaderGeometry { + static constexpr float trackSourceW=340.0f,trackSourceH=57.0f; + static constexpr float thumbSourceW=58.0f,thumbSourceH=124.0f; + juce::Rectangle track,thumb; + float left=0.0f,right=0.0f,position=0.0f; + static FaderGeometry calculate(float width,float height,float sliderPos) noexcept { + const float scale=juce::jlimit(0.01f,1.0f, + std::min((width-8.0f)/trackSourceW,(height-4.0f)/thumbSourceH)); + const float trackW=trackSourceW*scale,trackH=trackSourceH*scale; + const float thumbW=thumbSourceW*scale,thumbH=thumbSourceH*scale; + const float centerY=height*0.5f; + const float trackX=(width-trackW)*0.5f; + FaderGeometry g; + g.track={trackX,centerY-trackH*0.5f,trackW,trackH}; + g.left=trackX+thumbW*0.5f+2.0f; + g.right=trackX+trackW-thumbW*0.5f-2.0f; + g.position=juce::jlimit(g.left,g.right,sliderPos); + g.thumb={g.position-thumbW*0.5f,centerY-thumbH*0.5f,thumbW,thumbH}; + return g; + } +}; +} // namespace arson::ui diff --git a/plugin/HeaderLayout.h b/plugin/HeaderLayout.h index c9b1e4a..068990b 100644 --- a/plugin/HeaderLayout.h +++ b/plugin/HeaderLayout.h @@ -8,7 +8,7 @@ namespace arson::ui { // text/knobs down. Reused by the editor renderer and the Windows smoke tests. struct EditorMetrics { // Dense-but-usable hardware UI: 612px default instead of 704px. - // Main knobs keep a 62px drawing/drag target and readable 11px captions. + // Main knobs retain 58px hit targets and readable 10.4pt captions. static constexpr int minWidth=580, minHeight=480; static constexpr int defaultWidth=612, defaultHeight=500; static constexpr int maxWidth=1000, maxHeight=760; @@ -16,6 +16,12 @@ struct EditorMetrics { static constexpr int headerHeight=62, displayTop=64; static constexpr int displayBottomReserve=254; static constexpr int bottomControlsReserve=86; + // Single control geometry/typography contract; JUCE smoke uses these. + static constexpr float headerCaptionFont=9.5f; + static constexpr float buttonFont=11.0f; + static constexpr float controlCaptionFont=10.4f; + static constexpr int knobCaptionOffset=2, knobTopOffset=26, knobHeight=58; + static constexpr int faderCaptionOffset=25, faderTopOffset=44, faderHeight=34; static constexpr juce::uint32 captionRgb=0xffd9e0e3; static constexpr juce::uint32 controlCaptionRgb=0xffe4e9ec; static constexpr juce::uint32 headerBackgroundRgb=0xff292d30; diff --git a/tests/PluginSmoke.cpp b/tests/PluginSmoke.cpp index 52c2613..e5c3598 100644 --- a/tests/PluginSmoke.cpp +++ b/tests/PluginSmoke.cpp @@ -1,6 +1,7 @@ #include "../plugin/Processor.h" #include "../plugin/Editor.h" #include "../plugin/HeaderLayout.h" +#include "../plugin/FaderGeometry.h" #include "../plugin/PresetIO.h" #include "../plugin/FactoryPresetBank.h" #include "../plugin/GraphPaint.h" @@ -231,6 +232,19 @@ static int runSmoke(int argc,char** argv) { return 47; } + // Maintain native track/thumb aspect ratio at every window width. + for(float width : {70.0f,90.0f,105.0f,150.0f}) { + for(float height : {34.0f,40.0f}) { + const auto shape=arson::ui::FaderGeometry::calculate(width,height,width*0.5f); + if(std::abs(shape.track.getWidth()/shape.track.getHeight()-340.0f/57.0f)>0.001f || + std::abs(shape.thumb.getWidth()/shape.thumb.getHeight()-58.0f/124.0f)>0.001f || + shape.track.getX()<0 || shape.track.getRight()>width || + shape.thumb.getY()<0 || shape.thumb.getBottom()>height || + shape.left>=shape.right) { + std::cerr<<"FADER_ASPECT_RATIO_73 w="<=backdrop.getBrightness()-0.045f) { + std::cerr<<"FADER_HOUSING_DEPTH_78 pixel=" + <setValue(-23.0,juce::sendNotificationSync); if(!readout->getText().contains("-23.0"))return 57; if(threshold->getBounds().intersects(ratio->getBounds()))return 20; + for(const char* name : {"input","attack","release","threshold", + "ratio","knee","makeup"}) { + const auto* caption=editor->findChildWithID("caption."+juce::String(name)); + const auto* knob=editor->findChildWithID("param."+juce::String(name)); + if(!caption || !knob || knob->getY()-caption->getBottom()<7 || + knob->getBounds().intersects(caption->getBounds())) { + std::cerr<<"KNOB_CAPTION_OVERLAP_74 "<getHeight()!=62 || input->getHeight()!=62 || - attack->getHeight()!=62 || ratio->getHeight()!=62) { + if(threshold->getHeight()!=arson::ui::EditorMetrics::knobHeight || + input->getHeight()!=arson::ui::EditorMetrics::knobHeight || + attack->getHeight()!=arson::ui::EditorMetrics::knobHeight || + ratio->getHeight()!=arson::ui::EditorMetrics::knobHeight) { std::cerr<<"COMPACT_KNOB_HEIGHT_52 "<getHeight() <<", "<getHeight()<<", "<getHeight() <<", "<getHeight()<<'\n'; @@ -590,6 +625,21 @@ static int runSmoke(int argc,char** argv) { compare->getBounds()!=header.compare || file->getBounds()!=header.file || bypass->getBounds()!=header.bypass)return 65; + const auto* miniButton=dynamic_cast(mini); + const auto* fileButton=dynamic_cast(file); + const auto* dynButton=dynamic_cast(dynTab); + const auto* scButton=dynamic_cast(scTab); + if(!miniButton||miniButton->getButtonText()!="Mini"|| + !fileButton||fileButton->getButtonText()!="File"|| + !dynButton||dynButton->getButtonText()!="Dynamics"|| + !scButton||scButton->getButtonText()!="Sidechain")return 75; + for(const char* name : {"range","hold","mix","link"}) { + const auto* caption=editor->findChildWithID("caption."+juce::String(name)); + const auto* fader=editor->findChildWithID("param."+juce::String(name)); + if(!caption||!fader||fader->getY()-caption->getBottom()<4|| + fader->getHeight()!=arson::ui::EditorMetrics::faderHeight|| + fader->getBottom()>editor->getHeight()-5)return 76; + } // File controls are deliberately not mounted in the visible header. // Both independent tab views must have unclipped, non-overlapping // active controls at 740 and 780px. @@ -631,6 +681,12 @@ static int runSmoke(int argc,char** argv) { editor->findChildWithID("view.dynamics.tab")); if(!tab||!mainTab||!tab->onClick||!mainTab->onClick)return 29; tab->onClick(); + for(const char* name : {"highpass","lowpass"}) { + const auto* caption=editor->findChildWithID("caption."+juce::String(name)); + const auto* fader=editor->findChildWithID("param."+juce::String(name)); + if(!caption||!fader||fader->getY()-caption->getBottom()<4|| + fader->getHeight()!=arson::ui::EditorMetrics::faderHeight)return 77; + } if(!hp->isVisible()||!lp->isVisible()||!detector->isVisible()|| !external->isVisible()||!listen->isVisible()|| range->isVisible()||mix->isVisible()||autoMode->isVisible()||