mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 11:51:05 +01:00
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.
This commit is contained in:
1 parent
a78b648a3c
commit
ed8bfd173a
2 files changed
+2
-2
No files matched your search
@@ -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);
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user