From ed8bfd173a502f2dfe09ecce42222ca9e21dea4f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 15:31:59 -0800 Subject: [PATCH] Color Wheel: docs say a null opacity keeps the setting docs/mcp.md now says that ui.colorWheel keeps the opacity setting when the key is null, as the code and the params text already do. The opacity row uses the Tokens import that the merge of main added. --- crates/ui-egui/src/panels/color_wheel.rs | 2 +- docs/mcp.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panels/color_wheel.rs b/crates/ui-egui/src/panels/color_wheel.rs index 88c57136b4..f9a03d2614 100644 --- a/crates/ui-egui/src/panels/color_wheel.rs +++ b/crates/ui-egui/src/panels/color_wheel.rs @@ -305,7 +305,7 @@ fn opacity_row(app: &mut VectorcraftApp, ui: &mut Ui, tgt: &Target, color: &Colo let mut edit: Option<(f32, Live)> = None; ui.add_enabled_ui(live, |ui| { ui.horizontal(|ui| { - let t = crate::theme::Tokens::get(ui.ctx()); + let t = Tokens::get(ui.ctx()); crate::icons::icon(ui, "dc-transparency", 16.0, if live { t.icon } else { t.text_disabled }).on_hover_text(tl!("Opacity")); let width = (ui.available_width() - OPACITY_FIELD - ui.spacing().item_spacing.x).max(40.0); let shown = SliderValue::field(percent, 0.0..=100.0, "%", 0); diff --git a/docs/mcp.md b/docs/mcp.md index 9353d0b6e1..a574487c89 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -687,7 +687,7 @@ shows the wheel again. `"opacity": true` checks Show Opacity, as the panel menu box with a slider and a percent field sets the opacity of the fill or stroke row (`paint.setFill {opacity}`), the selected gradient stop or the selected freeform point (the first stop or point when none is selected), and `false` hides the row. The row is gray with nothing selected, for an object selected in a symbol instance, and when the fill -or stroke row it would set is on type characters or missing. Keys left out keep their values. +or stroke row it would set is on type characters or missing. Keys left out or null keep their values. Params that are not an object, another key or a value off the list return an error and change nothing. The command returns `{view, channel, opacity, vision}`, and the settings are kept with the preferences. `ui.colorWheel {"vision": true}` turns on the Color Wheel panel's Show Color Vision Preview, as its panel menu