With Preferences > Units > Numbers Without Units Are Points on (the
default), 2 typed in the panel's Picas row read as 2 pt and showed 0.167 p.
Each row now reads a number without a unit in its own unit, so 2 in the
Picas row is 2 picas, as addon.units.convert reads it with unit picas.
Length fields in other panels still follow the preference.
The number fields read a comma in a sum as a decimal comma, so 1,500+2 is
3.5 (widgets::decimal_point_tests::a_decimal_comma_reads_as_a_point), and
only a value that is one number with a thousands comma, such as 1,000 mm,
is refused. Checking each number of a sum for a thousands comma broke that
test. The check is back to the single number, and addon.units.convert reads
1,500+2 the same way the number fields do.
A value such as 1,000 mm+1 mm read the comma as a decimal point and gave
2 mm, because only a value that was one number was checked for a thousands
comma. Each number of a sum is now checked on its own, so 1,000 mm+1 mm,
+1,000 and 2*1,000 are refused in the number fields and in
addon.units.convert, and 100.5 mm-0,5 still reads as 100 mm.
Object › Plug-ins › Unit Converter › Unit Converter Panel opens a panel
with one number field per unit of Preferences › Units › East Asian Type
(pt, picas, in, mm, cm, px, ft & in, m, yd, ft, Q, Ha). A length typed in
any field, with units and arithmetic as every number field reads them,
updates the others as it is typed; text that does not read leaves them as
they were. From Selection reads the selection's width and height as the
Transform panel measures them, and Width or Height picks which one the
fields show; the size read is dropped when the document, its selection,
Use Preview Bounds or Measure Type by Glyph Bounds changes. Apply sets
that side through object.setBounds as the Transform panel's W or H field
does (its reference point, Constrain Width and Height Proportions and
Transform Object Only, Pattern Only or Both), as one undo step, and adds
none when the size is already that length. Each field's copy button
copies its value, with its unit when Copy with Units is on, and is named
with its unit for screen readers.
- addon.units.convert {value, unit?} gives a length in every unit, and
addon.units.selectionSize {} gives the selection's width and height the
same way. Neither changes the document. convert reads at most 1024
bytes and 128 + - * / signs.
- The decimal comma rule of the number fields moves from ui-egui to
vectorcraft_doc::decimal_point, so the command reads "0,5 mm" as the
fields do.
- The Transform panel's pattern switches are built by
with_pattern_switches, which run_transform and Apply share.
Closes#5528, as proposed by @ruchirguitar.
This reverts commit bada8e1710. #7638 merged with its gate failing: besides six unformatted
files, render and trace don't compile against craft-libs e2dc681 (u64::from(usize) in
render/src/paint.rs, a private craft-libs function, and a call with one argument too many in
trace/src/opaque.rs), so main's CI fails. The tree is that of 0adbdce6cb, whose CI passed.
#7592 documented brush.freehand's brush as optional, so the shortcut editor took it for a
command that runs without params and listed it, and listed_commands_run_from_a_key_without_a_missing_param
fails on main: a key press can't give the stroke's points. It joins NEEDS_A_PARAM with the
other commands that need a point.