Skip to main content

Module alpha_strip

Module alpha_strip 

Source
Expand description

AlphaStrip — 1D opacity slider with a checkerboard background + tinted gradient overlay.

Background: a checkerboard pattern in two neutral grays (so the transparency reads correctly against any underlying surface). The foreground is a Paint::LinearGradient fading from current_color.with_alpha(0.0) to current_color.with_alpha(1.0) along the strip’s primary axis. Vertical orientation reads transparent at the top (alpha=0) and opaque at the bottom (alpha=1); horizontal reads transparent on the leading edge.

Accessibility is Role::Slider, name “Opacity”, numeric_value = alpha × 100, range 0..100, step 1, jump 10.