Colours follow the system theme; night mode dims whatever theme is current #41

Closed
opened 2026-10-22 20:02:25 +00:00 by claude-bot · 0 comments
Collaborator

Found in the phone QC of #12 (owner, on the Plinius, build phase1/red-letters@dbd77eb).

Seen:

  • System theme light: turning night on leaves the page white and only turns the text light grey (#d6d6d6), which is harder to read than day.
  • System theme dark, night off: low contrast. Our fixed day text colour (#353637) is meant for a white page and sits on Suru's dark background.
  • System theme dark, night on: contrast goes up a lot. That is the opposite of what night is for.

Cause: the app paints fixed colours of its own. Theme.qml has a day set and a night set, applied as ApplicationWindow.palette.* in qml/Main.qml. On UT the style is Suru (QT_QUICK_CONTROLS_STYLE=Suru in the app's environment on the phone). Suru paints the window, Page and Pane from Suru.backgroundColor (Suru/ApplicationWindow.qml:31, Suru/Page.qml:44, Suru/Pane.qml:40) and ignores the palette. Only the text, which uses palette.text, follows our colours.

Why CI missed it: tools/e2e/lib.sh unsets QT_QUICK_CONTROLS_STYLE, so the cases run in the Default style, and the night line logs pane.palette.window, not the colour actually drawn.

New spec (owner, 2026-10-22): the OS manages light and dark; night mode is a dimmer version of whatever theme is current.

  • Day (night off): follow the system theme fully. The window, pages, controls and verse text take the current theme's colours: Suru light or dark on UT, the platform palette elsewhere. The app sets no fixed colours, so a dark system theme reads at its own contrast.

  • Night (on): the current theme, dimmed and at lower contrast. The text moves toward the background and the whole page gets darker:

    • light theme: a soft grey page with mid-grey text, not black on white;
    • dark theme: a near-black page with dimmed grey text;
    • red letters: a muted red per theme.

    Start at about 60–70% of the base theme's contrast; the owner tunes the values on the phone.

  • Theme changes: a system theme change while the app runs is followed live.

  • Brightness: the screen backlight is not touched; that would need permissions. "Dimmer" means the colours.

Implementation notes:

  • The Theme takes its base colours from the system: on UT, Suru's theme colours read in qml/platform/ut/, so no Suru API is in shared QML; elsewhere, the platform palette. Night derives from that base.
  • Red letters (#37) take their colour from the Theme for both modes. They currently come from the core as day red or night red, so the render option may need to become theme-relative.
  • E2E: check the colours actually drawn (the window and the verse text), for day and night on both a light and a dark base. Run under Suru if the CI image ships the style.

Part of #12; #12 stays open until the owner signs this off on the phone.

Found in the phone QC of #12 (owner, on the Plinius, build phase1/red-letters@dbd77eb). **Seen:** - **System theme light:** turning night on leaves the page white and only turns the text light grey (#d6d6d6), which is harder to read than day. - **System theme dark, night off:** low contrast. Our fixed day text colour (#353637) is meant for a white page and sits on Suru's dark background. - **System theme dark, night on:** contrast goes up a lot. That is the opposite of what night is for. **Cause:** the app paints fixed colours of its own. Theme.qml has a day set and a night set, applied as `ApplicationWindow.palette.*` in qml/Main.qml. On UT the style is Suru (`QT_QUICK_CONTROLS_STYLE=Suru` in the app's environment on the phone). Suru paints the window, Page and Pane from `Suru.backgroundColor` (`Suru/ApplicationWindow.qml:31`, `Suru/Page.qml:44`, `Suru/Pane.qml:40`) and ignores the palette. Only the text, which uses `palette.text`, follows our colours. **Why CI missed it:** tools/e2e/lib.sh unsets `QT_QUICK_CONTROLS_STYLE`, so the cases run in the Default style, and the night line logs `pane.palette.window`, not the colour actually drawn. **New spec (owner, 2026-10-22):** the OS manages light and dark; night mode is a dimmer version of whatever theme is current. - **Day (night off):** follow the system theme fully. The window, pages, controls and verse text take the current theme's colours: Suru light or dark on UT, the platform palette elsewhere. The app sets no fixed colours, so a dark system theme reads at its own contrast. - **Night (on):** the current theme, dimmed and at lower contrast. The text moves toward the background and the whole page gets darker: - light theme: a soft grey page with mid-grey text, not black on white; - dark theme: a near-black page with dimmed grey text; - red letters: a muted red per theme. Start at about 60–70% of the base theme's contrast; the owner tunes the values on the phone. - **Theme changes:** a system theme change while the app runs is followed live. - **Brightness:** the screen backlight is not touched; that would need permissions. "Dimmer" means the colours. **Implementation notes:** - The Theme takes its base colours from the system: on UT, Suru's theme colours read in `qml/platform/ut/`, so no Suru API is in shared QML; elsewhere, the platform palette. Night derives from that base. - Red letters (#37) take their colour from the Theme for both modes. They currently come from the core as day red or night red, so the render option may need to become theme-relative. - E2E: check the colours actually drawn (the window and the verse text), for day and night on both a light and a dark base. Run under Suru if the CI image ships the style. Part of #12; #12 stays open until the owner signs this off on the phone.
claude-bot changed title from Night mode only greys the text on Ubuntu Touch (Suru ignores the palette) to Colours follow the system theme; night mode dims whatever theme is current 2026-10-22 20:03:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
schaefera/utStudyBIble#41
No description provided.