Let the map brightness reach the map, and put the options in groups

The map brightness setting could not make the map visible on a vector
theme, which is the one place it was needed.  Those themes want the ground
well out of the way -- a tinted photograph of a county behind the vectors is
the one thing that stops a vector display looking like one -- and that was
done by multiplying the setting by about a quarter.  A multiplier is a
ceiling: turned the whole way up, the setting still gave a map at a tenth
the brightness the default theme gives, which is to say invisible, and no
amount of turning it up did anything about that.

It is a curve now rather than a ceiling.  The theme raises the setting to a
power, so the middle of the range is still quiet -- seventy per cent lands
where the old quarter did, which is the look these themes are for -- and the
top of the range is a full-brightness map on every theme there is.  On the
green phosphor the setting now spans a luminance of six to seventy where it
used to stop at twenty-one.

And the options are in six groups rather than one list: receiver, listening,
aircraft, animation, the map, labels.  Thirty-three of them on one screen is
a wall rather than a menu.  A number opens a group and a number inside it
changes an option, with the numbers still being each option's place in the
whole list so that the same number means the same option wherever it is
typed -- which meant reordering the list so that every group is contiguous,
and there is a test that says so.

A group menu makes a known option harder to reach than a flat list did, so
the name works too: typing "map brightness" at the top goes straight to it,
and part of a name lists everything it could mean.  A name that matches
exactly wins outright, so "speed" reaches the setting called speed rather
than that one and every other whose description happens to mention the word.

One thing to know: a bare number at the top of the menu now opens a group
where it used to edit the option of that number.  The tests that drove the
menu that way would have gone on silently editing whatever option shared the
number, so they ask by name now, and one of them checks that a group number
changes nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
The Dust Council 2026-09-06 12:26:00 -07:00
parent 2da1d1f245
commit 6d2436cde1
10 changed files with 540 additions and 250 deletions

View file

@ -244,8 +244,9 @@ def test_a_phosphor_theme_names_the_country_instead_of_drawing_its_flag():
def test_a_vector_theme_pushes_the_map_underneath_well_back():
"""A tinted photograph of a county behind the vectors is the one thing
that stops a vector display looking like one."""
"""In the middle of the range, where the setting usually sits: a tinted
photograph of a county behind the vectors is the one thing that stops a
vector display looking like one."""
levels = np.full((8, 8), fm.GROUND_SHADES - 1, dtype=np.uint8)
fm.set_theme("night")
plain = int(fm.dim_ground(levels, 0.7).max())
@ -254,11 +255,27 @@ def test_a_vector_theme_pushes_the_map_underneath_well_back():
assert quiet < plain * 0.6, f"{quiet} is not much darker than {plain}"
def test_the_brightness_setting_still_does_something_on_a_vector_theme():
def test_turning_the_brightness_the_whole_way_up_works_on_every_theme():
"""A curve, not a ceiling. Multiplied by a quarter instead, the setting
could not reach a visible map at all on a vector theme: turned the whole
way up it still came out at a tenth of what the default theme gives,
which is to say invisible."""
levels = np.full((8, 8), fm.GROUND_SHADES - 1, dtype=np.uint8)
for name in themes.THEMES:
fm.set_theme(name)
assert int(fm.dim_ground(levels, 1.0).max()) == fm.GROUND_SHADES - 1, \
f"{name} cannot reach a full-brightness map"
def test_the_brightness_setting_climbs_the_whole_way_on_a_vector_theme():
levels = np.full((8, 8), fm.GROUND_SHADES - 1, dtype=np.uint8)
fm.set_theme("phosphor")
assert int(fm.dim_ground(levels, 1.0).max()) > \
int(fm.dim_ground(levels, 0.3).max())
steps = [int(fm.dim_ground(levels, b).max())
for b in (0.1, 0.3, 0.5, 0.7, 0.85, 1.0)]
assert steps == sorted(steps), steps
assert steps[-1] > steps[0] * 8, steps
# And the middle of the range is still quiet, which is the look.
assert steps[3] < steps[-1] * 0.4, steps
# ---------------------------------------------------------------------------