Give the editor a visual identity and a real levels control

The panel now uses the same colours the page is drawn with, on dark
chrome so the scan is the brightest thing on screen. Levels move from two
anonymous sliders to the scan's own histogram with draggable black and
white points and a tone strip, since getting them wrong is the one
mistake that only shows up on the tablet. A page rail replaces the
stepper and carries each page's slice count; export is pinned below the
scroll instead of below the fold; marker types read as prose.
This commit is contained in:
Esa Kataja
2026-07-29 15:39:24 +03:00
parent cdf37302d7
commit 68e41c2470
6 changed files with 493 additions and 100 deletions
+7 -2
View File
@@ -77,9 +77,14 @@ def main() -> int:
# Skew and levels reach the model and re-render without raising.
editor.skew.setValue(-1.4)
assert abs(page.skew + 1.4) < 1e-6
editor.black.setValue(40)
editor.white.setValue(210)
# The levels bar carries the page's own histogram and drives the model
# directly — there are no sliders behind it to keep in step.
assert editor.levels.hist.sum() > 0, "the histogram should hold the scan"
editor.levels.set_levels(40, 210)
editor._levels_changed(40, 210)
assert project.page_levels(0) == (40, 210)
editor.rail.picked.emit(0) # the page rail navigates
assert editor.index == 0 and len(editor.rail.buttons) == len(project.pages)
# Metadata.
editor.metadata["title"].setText("Ketun joululaulu")