widget gallery and compositor test bench
feat: sliders are bands — the band and flat Slider variants and the flat RangeSlider go
cce-ui@6ba0c6c makes the band the only slider style; "Slider (readout)" stays.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
README.md | 10 +++++-----
src/main.rs | 6 +-----
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index a912ca7..6c3534b 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,9 @@ compositor does with the windows it spawns. It has no automated test suite.
## The page
One page, the widget gallery: one of each widget `cce_ui::widget` exports
-that stands on its own. Inputs: Button, ButtonStrip, Checkbox, Toggle, Slider,
-RangeSlider, Slider2D, Spinbox, Float3, TextBox, KeybindRecorder,
+that stands on its own. Inputs: Button, ButtonStrip, Checkbox, Toggle, Slider and
+RangeSlider (bands that swell at the value, the one slider style), Slider2D,
+Spinbox, Float3, TextBox, KeybindRecorder,
ColorSelector, FontSelector, Trackpad. Display: ProgressBar, UsageBar,
StatusDot, Separator, Splitter, InfoBox, InteractiveListItem, Breadcrumb,
TreeList, Plate, BevelPreview, RampPreview, Ramp. The MenuBar and StatusBar
@@ -24,7 +25,7 @@ After those come the variants: every further look a widget can take, one
exhibit each, labelled `<Widget> (<style>)`. The toolkit's own variants are a
constructor (`Button::new_reset`, `new_list_row`, `new_menu_item`,
`new_copy_icon`), a builder (`with_raised(false)` on Button, Toggle and
-Dropdown; `with_band`, `with_recessed(false)` and `with_readout` on Slider;
+Dropdown; `with_readout` on Slider;
`with_multiline`, `with_draw_bg_border(false)` and `with_password` on
TextBox; `with_vertical` on ButtonStrip, and the Paginator built on it), or a
per-widget override of a config-wide style (`Toggle::with_slide`, the
@@ -32,8 +33,7 @@ per-widget override of a config-wide style (`Toggle::with_slide`, the
`style.control.slider.style`). The controls whose default look is worked
into the plate — ButtonStrip's well with its raised selected segment,
FontSelector's flush trough, the wells of KeybindRecorder, ColorSelector's
-hex field, RangeSlider, ProgressBar, UsageBar and Trackpad — show their flat
-look too (`with_recessed(false)` / `with_raised(false)`, what
+hex field, ProgressBar, UsageBar and Trackpad — show their flat look too (`with_recessed(false)` / `with_raised(false)`, what
`control_relief = 0` renders), and ColorSelector its alpha swatch. The four
StatusDot statuses and the plain Label round it off. When a widget gains a
style, it gains an exhibit here.
diff --git a/src/main.rs b/src/main.rs
index ad3cb55..4efdf7a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -737,7 +737,6 @@ fn variant_exhibits() -> Vec<Exhibit> {
let ddh = cce_ui::layout::dropdown_height();
let fsh = cce_ui::layout::font_selector_height();
let csh = cce_ui::layout::color_selector_height();
- let rsh = cce_ui::layout::rangeslider_height();
let pbh = cce_ui::layout::progressbar_height();
// A StatusDot is 12px square; its exhibit is as wide as its label.
const DOT_W: f32 = 150.0;
@@ -755,9 +754,7 @@ fn variant_exhibits() -> Vec<Exhibit> {
// Toggle: the slide style (config `style.control.toggle.style`), and flat.
Exhibit::new(Toggle::new().with_label("Toggle (slide)").with_slide(true), W, tgh),
Exhibit::new(Toggle::new().with_label("Toggle (flat)").with_raised(false), W, tgh),
- // Slider: the band style (config `style.control.slider.style`), flat, with a readout.
- Exhibit::new(Slider::new().with_label("Slider (band)").with_band(true), W, slh),
- Exhibit::new(Slider::new().with_label("Slider (flat)").with_recessed(false), W, slh),
+ // Slider: with a readout.
Exhibit::new(Slider::new().with_label("Slider (readout)").with_readout(true), W, slh),
// TextBox: multiline, chromeless, password.
Exhibit::sized(
@@ -796,7 +793,6 @@ fn variant_exhibits() -> Vec<Exhibit> {
Exhibit::new(KeybindRecorder::new("ctrl+1".to_string()).with_recessed(false).with_label("KeybindRecorder (flat)"), W, tbh),
Exhibit::new(ColorSelector::new([64, 128, 255]).with_recessed(false).with_label("ColorSelector (flat)"), W, csh),
Exhibit::new(ColorSelector::new_rgba([64, 128, 255, 128]).with_label("ColorSelector (alpha)"), W, csh),
- Exhibit::new(RangeSlider::new().with_recessed(false).with_label("RangeSlider (flat)"), W, rsh),
Exhibit::new(ProgressBar::new(0.43).with_recessed(false).with_label("ProgressBar (flat)"), W, pbh),
Exhibit::new(UsageBar::new(0.62).with_recessed(false).with_label("UsageBar (flat)"), W, pbh),
Exhibit::sized(Trackpad::new().with_recessed(false).with_label("Trackpad (flat)"), W, TABS_H),