Group the panel by what operations say they are about
A strip of groups over the adjust panel — Light, Colour, Detail — derived from the attributes the operations declare. `adjust.slint` names none of them: the strings arrive resolved and the panel only draws them, so a new operation joins the right group by saying what it is and this file does not change (FR-DEV-3a). A group nothing carries is not offered, so a tab never opens onto nothing. Geometry is left out because its one operation prefers an on-canvas widget and is skipped by the row builder — a Geometry tab would be empty while `GeometryPanel` holds the real controls. The strip appears only when there is more than one group to choose between; a single tab is a control with one option. The selected group is underlined rather than filled. The accent means *modified* everywhere else in this interface, and spending it on "which tab" would blunt the one signal the panel has. **The trap, and it nearly bit again.** `op_index` on a row counts over every capability, not over the ones a filter kept — it is how a row routes back to the core. Renumbering it while filtering would make a slider drive a different operation, which looks like a rendering fault rather than a routing one. `rows_filtered` keeps `enumerate` over the full list and only `group_head` is a position within the emitted rows; a test moves a value through a filtered row and checks it lands where it was asked to. Six tests, including that a nonsense index falls back to showing everything rather than to showing nothing.
This commit is contained in:
@@ -13,6 +13,15 @@
|
||||
pub fn resolve(key: &str) -> String {
|
||||
match key {
|
||||
// Operations
|
||||
// The attribute names. Short on purpose: these are read as a strip
|
||||
// of tabs, where a long word crowds out the next one.
|
||||
"attr.tone" => "Light".into(),
|
||||
"attr.colour" => "Colour".into(),
|
||||
"attr.detail" => "Detail".into(),
|
||||
"attr.optics" => "Optics".into(),
|
||||
"attr.geometry" => "Geometry".into(),
|
||||
"attr.effect" => "Effects".into(),
|
||||
|
||||
"op.white_balance" => "White Balance".into(),
|
||||
"op.exposure" => "Exposure".into(),
|
||||
"op.highlights_shadows" => "Highlights & Shadows".into(),
|
||||
|
||||
Reference in New Issue
Block a user