ui/settings_page.rs#
Source: lib/ui/settings_page.rs
settings_page -- the settings page of a typed schema (base::settings)
settings_page(id, &mut settings) -> true when a value changed in this pass
settings_section(id, &mut settings, section) the same for the keys of one section
The keys of the schema without KF_HIDDEN, grouped by section: the sections of
Schema::sections first (with their titles), then the others in the order of their first
key (titled by their name; keys without a section: "Allgemein"). Each section is a title
and a card; each key a row: its label on the left, the control on the right -- bool a
switch, int a number box (min..max, step), num a number box with its decimals, text a text
box (at most max bytes), choice a combo box, colour a swatch and a button with the hex code
that opens a picker -- and a reset button (disabled at the default); its help text and
(KF_RESTART) a note below. The label is the text right before the control, so screen
readers name text boxes, number boxes and combo boxes by it (their own text is their
value); the switch and the colour button carry it as their label (scripts: click "Dunkles
Design"). The reset buttons are "Zurücksetzen: <label>". Labels, help texts, section
titles and choice labels go through i18n::t (the app's catalogue). Ids: the scope of `id`,
then the key's name ("value", "reset", "swatch", "pick" inside it; ids.rs).
impl Ui
fn settings_page(&mut self, id: u32, s: &mut Settings) -> boolthe settings page of the schema ofs(see the module header) -> a value changedfn settings_section(&mut self, id: u32, s: &mut Settings, section: &str) -> boolsettings_page with only the keys ofsection(the part of their names before the '.'): one page of a settings dialog that lists its sections at the side (an options page of the File register). The section's title is shown; the ids are those settings_page gives the same keys.