Open presets from a menu at the foot of the tool rail

Presets were a "Presets…" button in develop's top bar that opened a
sheet over the photograph, so applying one was two clicks with the
picture covered. They are now an entry pinned to the bottom of the tool
rail, apart from the tools because a preset arms nothing, and it opens a
menu beside the rail: the same sectioned rows the sheet lists, one click
to apply to the open photograph. The menu's last row, "Save or manage…",
opens the sheet, which keeps saving, renaming, reverting and importing,
since those take a name or a path.

The menu is a PopupWindow for the film list's reasons, with the list in
a clipped box of its own; the Flickable alone let its last row draw over
the manage row. Choosing from it zeroes preset-apply-count before
applying, since the grid may have left its selection count there.

The manual says where presets are now and gains a picture of the open
menu. The scenes reach the sheet through the menu and aim the manage
row from the rail's entry, as the film list's rows are aimed, because
the automation reports a popup's elements in the popup's coordinates.
This commit is contained in:
2026-09-27 16:08:33 -04:00
parent e22128c16b
commit f52c4cb8b6
13 changed files with 366 additions and 81 deletions
+30 -5
View File
@@ -1148,11 +1148,35 @@ def film_reach():
undo_all()
@scene(media=['presets.png'], sources=DEVELOP_SRC + ['ui/dr-ui/ui/presets.slint', 'ui/dr-ui/src/presets.rs'])
PRESET_ROW = 32 # `menu-row-height` in toolrail.slint
def presets_menu_open():
"""The presets menu at the foot of the tool rail, open."""
dr.click_on('Presets@Button')
dr.wait_for('Save or manage…@Button', 5)
def presets_manage():
""""Save or manage…", the menu's last row, pressed to open the sheet.
Aimed from the rail's entry rather than by name, as the film list's rows
are: the automation reports a popup's elements in the popup's own
coordinates. The menu opens beside the entry with its foot level with
the entry's, and the row is the last `PRESET_ROW` of it."""
_, _, x1, y1 = dr.rect('Presets@Button')
dr.click(x1 + 100, y1 - PRESET_ROW // 2)
dr.wait_for('CARRIES@Text', 5)
@scene(media=['presets-menu.png', 'presets.png'],
sources=DEVELOP_SRC + ['ui/dr-ui/ui/presets.slint', 'ui/dr-ui/src/presets.rs'])
def presets():
at_develop()
dr.click_on('Presets…@Button')
dr.wait_for('CARRIES@Text', 5)
presets_menu_open()
pause(1.0)
shot('presets-menu')
presets_manage()
pause(1.5)
shot('presets')
dr.click_on('Done@Button#-1')
@@ -1170,8 +1194,9 @@ def presets_film():
at_develop()
rec('presets-film')
pause(0.4)
dr.click_on('Presets…@Button')
dr.wait_for('CARRIES@Text', 5)
presets_menu_open()
pause(0.8)
presets_manage()
pause(1.5)
x, y = dr.centre('Crisp detail@Button')
for _ in range(80): # a notch at a time, so the film shows the sections pass