diff --git a/CMakeLists.txt b/CMakeLists.txt index 1dcfd84..5dc1800 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,12 +50,10 @@ if(ARSON_BUILD_PLUGIN) PRODUCT_NAME "ArSonComp" IS_SYNTH FALSE NEEDS_MIDI_INPUT FALSE NEEDS_MIDI_OUTPUT FALSE IS_MIDI_EFFECT FALSE EDITOR_WANTS_KEYBOARD_FOCUS FALSE COPY_PLUGIN_AFTER_BUILD FALSE VST3_CATEGORIES Fx Dynamics) - # Bundled reference-derived black brushed-metal image. Generated assets - # are compiled into the VST3/Standalone; no filesystem access at runtime. + # Keep only knob, toggle and logo assets: faders are pure JUCE vectors. + # No track/thumb PNG or runtime resampling. juce_add_binary_data(ArSonCompKnobAssets SOURCES assets/black_brushed_knob.jpg - assets/gunmetal_slider_track.png - assets/gunmetal_slider_thumb_red.png assets/toggle/arson_toggle_on.png assets/toggle/arson_toggle_off.png assets/arsoncomp_header_logo.png) diff --git a/assets/gunmetal_slider_thumb_red.png b/assets/gunmetal_slider_thumb_red.png deleted file mode 100644 index ac2e40c..0000000 Binary files a/assets/gunmetal_slider_thumb_red.png and /dev/null differ diff --git a/assets/gunmetal_slider_track.png b/assets/gunmetal_slider_track.png deleted file mode 100644 index cda74e9..0000000 Binary files a/assets/gunmetal_slider_track.png and /dev/null differ diff --git a/docs/M61-GUI-POLISH.md b/docs/M61-GUI-POLISH.md new file mode 100644 index 0000000..d5238a9 --- /dev/null +++ b/docs/M61-GUI-POLISH.md @@ -0,0 +1,25 @@ +# M6.1 — Dark Brushed Thumb and Uncropped Rotary Knobs + +## Scope +This is a GUI-only refinement of the M6 baseline (commit 8878167). +No compressor DSP, parameter, automation, ASIO, preset, or audio scheduling changes. + +## Changes +- New bundled, transparent 58×124 PNG thumb, an original dark graphite/black + brushed-metal cap matching the tone and soft metal bevel of the rotary knob. + A small coral center pin stays tactile without an oversized silver ridge. +- Remove the prior bright-silver thumb-back and overpainted ridge. Draw the + image once with its source aspect ratio using the existing FaderGeometry. +- Fix a measurable clipping condition: the complete rotary arc extended + beyond a 58px slider rectangle because the halo offset and stroke width + were not included when fitting its diameter. Expand the primary component + height to 66px within the existing compact panel, then enforce clearance + with a shared KnobGeometry contract used by renderer and test suite. +- Preserve 612×500 default and 580×480 minimum; retain full / MINI / + SIDECHAIN support. All assets decode once on the JUCE message thread. + +## Acceptance +Actual Windows Standalone/VST3 smoke screenshots in Full, minimum, MINI and +SIDECHAIN; check the dark cap at slider extremes and the full coral arcs above +all seven rotaries. Linux DSP engine tests unchanged. A passing CI is not proof +of stable hardware audio; PS22 crackle investigation remains separate. diff --git a/docs/M62-VECTOR-FADERS-TALL-LCD.md b/docs/M62-VECTOR-FADERS-TALL-LCD.md new file mode 100644 index 0000000..209117c --- /dev/null +++ b/docs/M62-VECTOR-FADERS-TALL-LCD.md @@ -0,0 +1,25 @@ +# M6.2 — Tall LCD and Vector Faders + +## Visual changes + +- Default full-size window **612 × 580 px** (formerly 612 × 500). +- Minimum **580 × 540 px** (formerly 580 × 480). No increase in width. +- LCD is **326 px high** at default size, versus 246 px before. The actual + transfer/history plot grows from 186 to 266 px high, a **43% gain**. +- Preserve seven unclipped metal knobs, caption spacing, Dynamics/Sidechain + controls, and MINI mode (612 × 320 px at default width). +- All **six horizontal sliders** (Range, Hold, Mix, Link, HP, LP) now use + JUCE Graphics directly: dark graphite inset rail, subtle metallic border, + coral LED fill, sculpted graphite thumb, short coral grip marker. +- No PNG-based slider track or thumb, no resampling and no allocation/decoding + in the live audio processing callback. + +## Verification and release gate + +- Windows: build VST3 + Standalone, smoke CTest and actual snapshot PNGs for + default full, minimum full, MINI and Sidechain. +- Smoke tests: LCD aspect ratio, exact component geometry, thumb legibility, + animated rail fill and old M6.1 non-clipped rotary arc bounds. +- Linux: full sanitizer engine-safety suite. +- DSP, preset bank, audio latency, ASIO, automation and routing are unchanged. + Physical Maono PS22 crackle remains a separate hardware QA requirement. diff --git a/plugin/Editor.cpp b/plugin/Editor.cpp index 865d8ef..a3b14fd 100644 --- a/plugin/Editor.cpp +++ b/plugin/Editor.cpp @@ -6,6 +6,7 @@ #include "GraphHistory.h" #include "HeaderLayout.h" #include "FaderGeometry.h" +#include "KnobGeometry.h" #include "BinaryData.h" #include #include @@ -51,15 +52,6 @@ CompLook::CompLook() { static_cast(BinaryData::arson_toggle_off_pngSize)); jassert(toggleOn.isValid() && toggleOff.isValid()); jassert(toggleOn.getBounds()==toggleOff.getBounds()); - // Two light-weight, transparent gunmetal assets are decoded once, - // exclusively on the GUI thread; no file I/O or decoding in paint(). - sliderTrack=juce::ImageFileFormat::loadFrom( - BinaryData::gunmetal_slider_track_png, - static_cast(BinaryData::gunmetal_slider_track_pngSize)); - sliderThumb=juce::ImageFileFormat::loadFrom( - BinaryData::gunmetal_slider_thumb_red_png, - static_cast(BinaryData::gunmetal_slider_thumb_red_pngSize)); - jassert(sliderTrack.isValid() && sliderThumb.isValid()); setColour(juce::Slider::textBoxTextColourId,text); setColour(juce::Slider::textBoxBackgroundColourId,juce::Colour{0xff111417}); setColour(juce::Slider::textBoxOutlineColourId,juce::Colour{0xff31383e}); @@ -166,17 +158,14 @@ const juce::Image& CompLook::knobFace(int diameter,bool primary) { void CompLook::drawRotarySlider(juce::Graphics& g,int x,int y,int w,int h, float pos,float start,float end,juce::Slider& slider) { const bool primary=slider.getName()=="Threshold"; - const float r=std::max(13.0f,std::min( - static_cast(w)*(primary?0.400f:0.385f), - static_cast(h)*(primary?0.400f:0.385f))); - const int pixels=juce::jmax(28,static_cast(std::ceil(r*2.0f+7.0f))); + const int pixels=arson::ui::KnobGeometry::facePixels(w,h,primary); const float cx=x+w*0.5f,cy=y+h*0.50f; const float angle=start+clamp01(pos)*(end-start); const float bodyRadius=pixels*0.5f; // Draw the level RING FIRST. Its radius is larger than the black metal // photograph, so the dial occludes the inner arc naturally, as a physical // knob would. Nothing gets painted on top of the metal except the dot. - const float trackRadius=bodyRadius+2.2f; + const float trackRadius=bodyRadius+arson::ui::KnobGeometry::arcOutsideFace; juce::Path inactive,active; inactive.addCentredArc(cx,cy,trackRadius,trackRadius,0.0f,start,end,true); active.addCentredArc(cx,cy,trackRadius,trackRadius,0.0f,start,angle,true); @@ -205,9 +194,8 @@ 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&) { - // 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. + // Modern vector-only JUCE fader; no texture, sprite or image resampling. + // Host automation, keyboard input and gestures remain native JUCE Slider. const auto geometry=arson::ui::FaderGeometry::calculate( static_cast(w),static_cast(h),pos); const auto track=geometry.track.translated(static_cast(x), @@ -215,71 +203,62 @@ void CompLook::drawLinearSlider(juce::Graphics& g,int x,int y,int w,int h, 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()) { - g.setImageResamplingQuality(juce::Graphics::highResamplingQuality); - g.drawImage(sliderTrack,track); - } else { - g.setColour(juce::Colour{0xff292f33}); - g.fillRoundedRectangle(track,track.getHeight()*0.35f); - } - // 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); - 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); + const float progress=juce::jlimit(0.0f,1.0f, + (geometry.position-geometry.left)/(geometry.right-geometry.left)); + + // Inset charcoal rail: restrained outline, clear separation from chassis. + const auto housing=track.expanded(1.4f,2.6f); + g.setColour(juce::Colour{0xff11171b}); + g.fillRoundedRectangle(housing,4.2f); + g.setColour(juce::Colour{0xff6e777c}.withAlpha(0.43f)); + g.drawRoundedRectangle(housing.reduced(0.35f),4.0f,0.85f); + g.setColour(juce::Colour{0xff070c10}); + g.fillRoundedRectangle(track,track.getHeight()*0.5f); + g.setColour(juce::Colour{0xff9ba4a8}.withAlpha(0.15f)); + g.drawHorizontalLine(juce::roundToInt(track.getY()+1.0f), + track.getX()+3.0f,track.getRight()-3.0f); + + // Coral level fill, clipped into rounded channel. Minimum is fully dark. + if(progress>0.001f) { + juce::Graphics::ScopedSaveState clip(g); + juce::Path channel; + channel.addRoundedRectangle(track,track.getHeight()*0.5f); + g.reduceClipRegion(channel); + const float litRight=track.getX()+track.getWidth()*progress; g.setGradientFill(juce::ColourGradient( - 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); - } - // 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,thumb); - } else { - g.setColour(juce::Colour{0xff929fa5}); - g.fillRoundedRectangle(thumb,2.5f); + juce::Colour{0xfffc8587},track.getX(),track.getY(), + juce::Colour{0xffb33b4d},track.getX(),track.getBottom(),false)); + g.fillRect(track.getX(),track.getY(), + litRight-track.getX(),track.getHeight()); + if(litRight>track.getX()+4.0f) { + g.setColour(juce::Colour{0xffffd1cf}.withAlpha(0.43f)); + g.drawHorizontalLine(juce::roundToInt(cy-0.5f), + track.getX()+2.0f,litRight-1.0f); + } } - // 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); + + // Sharp graphite thumb with soft satin bevel + small red engraved grip. + // At actual 34px height the thumb remains 13-15px wide and 28px tall. + g.setColour(juce::Colours::black.withAlpha(0.48f)); + g.fillRoundedRectangle(thumb.translated(0.0f,1.4f),3.2f); + juce::ColourGradient brushed(juce::Colour{0xff869198},thumb.getX(),cy, + juce::Colour{0xff414a51},thumb.getRight(),cy,false); + brushed.addColour(0.19,juce::Colour{0xff707c83}); + brushed.addColour(0.40,juce::Colour{0xff333c43}); + brushed.addColour(0.73,juce::Colour{0xff222b31}); + g.setGradientFill(brushed); + g.fillRoundedRectangle(thumb,3.1f); + g.setColour(juce::Colour{0xffa3adb2}.withAlpha(0.62f)); + g.drawRoundedRectangle(thumb.reduced(0.7f),2.6f,0.85f); + g.setColour(juce::Colours::white.withAlpha(0.10f)); + g.drawVerticalLine(juce::roundToInt(thumb.getX()+2.1f), + thumb.getY()+4.0f,thumb.getBottom()-4.0f); + const juce::Rectangle grip{ + thumb.getX()+3.1f,cy-1.2f,thumb.getWidth()-6.2f,2.4f}; + g.setColour(juce::Colour{0xff141a1f}); + g.fillRoundedRectangle(grip.expanded(0.4f,0.65f),1.25f); + g.setColour(juce::Colour{0xffed7279}); + g.fillRoundedRectangle(grip,1.2f); } void CompLook::drawToggleButton(juce::Graphics& g,juce::ToggleButton& button, bool highlighted,bool down) { @@ -317,7 +296,7 @@ Editor::Editor(Processor& p):AudioProcessorEditor(p),processor(p),alternate(p.sn setLookAndFeel(&look); setOpaque(true); // Crisp vector-font wordmark replaces a low-contrast bitmap in the - // tight 88px header; photo knob/slider assets remain predecoded. + // tight 88px header; knob assets remain predecoded; the faders are fully vector painted. const std::array bars{{arson::Range,arson::Hold,arson::Mix, arson::Link,arson::Highpass,arson::Lowpass}}; for(std::size_t i=0;i faces; // normal + oversized Threshold only 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 const juce::Image& knobFace(int diameter,bool primary); }; class Editor final : public juce::AudioProcessorEditor, private juce::Timer { @@ -118,7 +117,7 @@ class Editor final : public juce::AudioProcessorEditor, private juce::Timer { juce::String currentPresetTitle{"Custom / restored"}; bool alternateActive=false; bool compactMode=false,thresholdDragging=false,sidechainPanel=false; - int expandedWidth=612,expandedHeight=500; + int expandedWidth=612,expandedHeight=580; std::array history{}; std::size_t head=0; float inputDb=-120,outputDb=-120,gr=0; diff --git a/plugin/FaderGeometry.h b/plugin/FaderGeometry.h index 57ce144..f2de112 100644 --- a/plugin/FaderGeometry.h +++ b/plugin/FaderGeometry.h @@ -3,27 +3,23 @@ #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. +// Canonical vector geometry for the six horizontal faders. +// No bitmap aspect ratios, resampling or stretched controls. 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 constexpr float railHeight=6.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; + const float inset=juce::jlimit(8.0f,11.0f,width*0.10f); + const float capW=juce::jlimit(12.0f,15.0f,height*0.40f); + const float capH=juce::jlimit(22.0f,29.0f,height-5.0f); + const float cy=height*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.track={inset,cy-railHeight*0.5f,width-2.0f*inset,railHeight}; + g.left=inset+capW*0.5f; + g.right=width-inset-capW*0.5f; g.position=juce::jlimit(g.left,g.right,sliderPos); - g.thumb={g.position-thumbW*0.5f,centerY-thumbH*0.5f,thumbW,thumbH}; + g.thumb={g.position-capW*0.5f,cy-capH*0.5f,capW,capH}; return g; } }; diff --git a/plugin/HeaderLayout.h b/plugin/HeaderLayout.h index 068990b..16d48f1 100644 --- a/plugin/HeaderLayout.h +++ b/plugin/HeaderLayout.h @@ -7,11 +7,11 @@ namespace arson::ui { // Keep actual controls comfortably sized; remove blank canvas before scaling // 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. + // Narrow 612px chassis with taller LCD; full 612x580, minimum 580x540. // 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; + static constexpr int minWidth=580, minHeight=540; + static constexpr int defaultWidth=612, defaultHeight=580; + static constexpr int maxWidth=1000, maxHeight=820; static constexpr int miniHeight=320; static constexpr int headerHeight=62, displayTop=64; static constexpr int displayBottomReserve=254; @@ -20,7 +20,7 @@ struct EditorMetrics { 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 knobCaptionOffset=2, knobTopOffset=26, knobHeight=66; static constexpr int faderCaptionOffset=25, faderTopOffset=44, faderHeight=34; static constexpr juce::uint32 captionRgb=0xffd9e0e3; static constexpr juce::uint32 controlCaptionRgb=0xffe4e9ec; diff --git a/plugin/KnobGeometry.h b/plugin/KnobGeometry.h new file mode 100644 index 0000000..34f5fca --- /dev/null +++ b/plugin/KnobGeometry.h @@ -0,0 +1,30 @@ +#pragma once +#include +#include +#include + +namespace arson::ui { +// Canonical visual bounds for the satin metal rotary face AND its red arc. +// Never permit an arc stroke to be cropped by a JUCE Slider component. +struct KnobGeometry final { + static constexpr float arcOutsideFace=2.2f; + static constexpr float widestArcStroke=5.2f; + static constexpr float safeInset=1.25f; + static int facePixels(int width,int height,bool threshold) noexcept { + const float fraction=threshold?0.400f:0.385f; + const float suggestedRadius=std::max(13.0f, + std::min(static_cast(width)*fraction, + static_cast(height)*fraction)); + const int desired=juce::jmax(28, + static_cast(std::ceil(suggestedRadius*2.0f+7.0f))); + const int available=static_cast(std::floor( + static_cast(std::min(width,height))- + 2.0f*(arcOutsideFace+widestArcStroke*0.5f+safeInset))); + return std::min(desired,std::max(24,available)); + } + static float outerPaintRadius(int faceDiameter) noexcept { + return static_cast(faceDiameter)*0.5f+ + arcOutsideFace+widestArcStroke*0.5f; + } +}; +} // namespace arson::ui diff --git a/tests/PluginSmoke.cpp b/tests/PluginSmoke.cpp index e5c3598..aa5a545 100644 --- a/tests/PluginSmoke.cpp +++ b/tests/PluginSmoke.cpp @@ -2,6 +2,7 @@ #include "../plugin/Editor.h" #include "../plugin/HeaderLayout.h" #include "../plugin/FaderGeometry.h" +#include "../plugin/KnobGeometry.h" #include "../plugin/PresetIO.h" #include "../plugin/FactoryPresetBank.h" #include "../plugin/GraphPaint.h" @@ -208,43 +209,50 @@ static int runSmoke(int argc,char** argv) { if(std::abs(audio.getSample(0,0)-0.123f)>1.0e-6f || std::abs(audio.getSample(0,31)-0.123f)>1.0e-6f)return failHost(46); } - // Hardware fader layer contract: independent transparent photo plate - // (stationary), photo thumb (red aperture) and moving red LED level. - // Confirm real JUCE BinaryData resources, not external installation paths. + // Fully vector JUCE Graphics faders; raster and geometric regression. { - const auto plate=juce::ImageFileFormat::loadFrom( - BinaryData::gunmetal_slider_track_png, - static_cast(BinaryData::gunmetal_slider_track_pngSize)); - const auto thumb=juce::ImageFileFormat::loadFrom( - BinaryData::gunmetal_slider_thumb_red_png, - static_cast(BinaryData::gunmetal_slider_thumb_red_pngSize)); - if(!plate.isValid() || plate.getWidth()!=340 || plate.getHeight()!=57 || - !thumb.isValid() || thumb.getWidth()!=58 || thumb.getHeight()!=124 || - plate.getPixelAt(0,0).getFloatAlpha()>0.04f || - thumb.getPixelAt(0,0).getFloatAlpha()>0.04f || - plate.getPixelAt(170,29).getFloatAlpha()<0.92f || - thumb.getPixelAt(29,62).getFloatAlpha()<0.92f) { - std::cerr<<"GUNMETAL_RESOURCE_47 track="<width || + shape.thumb.getX()<0||shape.thumb.getRight()>width || + shape.thumb.getY()<0||shape.thumb.getBottom()>height || + shape.thumb.getWidth()<12.0f||shape.thumb.getHeight()<22.0f || + shape.right<=shape.left)return 73; } + { + CompLook look; + juce::Image raster(juce::Image::ARGB,100,34,true); + { + juce::Graphics g(raster); + g.fillAll(juce::Colour{0xff262c31}); + juce::Slider dummy; + look.drawLinearSlider(g,0,0,100,34,55.0f,0.0f,100.0f, + juce::Slider::LinearHorizontal,dummy); + } + const auto shape=arson::ui::FaderGeometry::calculate(100.0f,34.0f,55.0f); + const int px=juce::roundToInt(shape.thumb.getX()+2.0f); + const int py=juce::roundToInt(shape.thumb.getY()+5.0f); + const float cap=raster.getPixelAt(px,py).getBrightness(); + const float backdrop=raster.getPixelAt(2,py).getBrightness(); + if(cap<0.22f || cap-backdrop<0.06f) { + std::cerr<<"VECTOR_CAP_CONTRAST_87 cap="<findChildWithID("preset.load")) return 18; - editor->setSize(iteration%2 ? 580 : 612,iteration%2 ? 480 : 500); + editor->setSize(iteration%2 ? 580 : 612,iteration%2 ? arson::ui::EditorMetrics::minHeight : arson::ui::EditorMetrics::defaultHeight); if(editor->getWidth()!=(iteration%2 ? 580 : 612) || - editor->getHeight()!=(iteration%2 ? 480 : 500))return 9; + editor->getHeight()!=(iteration%2 ? arson::ui::EditorMetrics::minHeight : arson::ui::EditorMetrics::defaultHeight))return 9; auto* threshold=editor->findChildWithID("param.threshold"); auto* input=editor->findChildWithID("param.input"); auto* ratio=editor->findChildWithID("param.ratio"); @@ -557,6 +563,10 @@ static int runSmoke(int argc,char** argv) { editor->getHeight()-arson::ui::EditorMetrics::displayBottomReserve}; if(!canvas || !canvas->isVisible() || !canvas->isOpaque() || canvas->getBounds()!=expectedCanvas)return 70; + // LCD must remain spacious at minimum and default window dimensions. + if(canvas->getHeight()<280 || + static_cast(canvas->getHeight())/canvas->getWidth()<0.47f) + return 88; auto* readout=dynamic_cast( editor->findChildWithID("view.value.readout")); if(!readout || !readout->isVisible() || @@ -576,6 +586,18 @@ static int runSmoke(int argc,char** argv) { std::cerr<<"KNOB_CAPTION_OVERLAP_74 "<findChildWithID("param."+juce::String(id)); + if(!dial)return 84; + const int diameter=arson::ui::KnobGeometry::facePixels( + dial->getWidth(),dial->getHeight(), + juce::String(id)=="threshold"); + if(arson::ui::KnobGeometry::outerPaintRadius(diameter) + +arson::ui::KnobGeometry::safeInset > + 0.5f*std::min(dial->getWidth(),dial->getHeight())+0.01f) + return 85; + } // New compact primary knob row: height budget for larger black LCD // without collapsing control interaction areas at minimum size. if(threshold->getHeight()!=arson::ui::EditorMetrics::knobHeight || @@ -801,7 +823,7 @@ static int runSmoke(int argc,char** argv) { if(!stream || !juce::PNGImageFormat{}.writeImageToStream(compactImage,*stream))return 13; } mini->onClick(); - if(editor->getHeight()!=500)return 14; + if(editor->getHeight()!=arson::ui::EditorMetrics::defaultHeight)return 14; if(canvas->getBounds()!=juce::Rectangle{8, arson::ui::EditorMetrics::displayTop,editor->getWidth()-16, editor->getHeight()-arson::ui::EditorMetrics::displayBottomReserve})return 72;