Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Auto adapt text color based on backgroud

Suphon Thanakornpakapong requested to merge 230-blisslauncher_dark_text into master

Description

Use dark text on light wallpapers.

Issue(s)

https://gitlab.e.foundation/e/os/backlog/-/issues/230 https://gitlab.e.foundation/e/os/backlog/-/issues/210 https://gitlab.e.foundation/e/os/backlog/-/issues/211 https://gitlab.e.foundation/e/os/backlog/-/issues/212

Dependency: !74 (closed)

Test environment

Test procedures

Technical details

The system's wallpaper manager provides hints about the wallpaper color. I implemented a dark text version of the launcher theme, and switch it on based on the system color hints.

Note that this dark text theme also applies to widgets. The weather widget is part of the launcher and already inherits this theming. For other first-party widgets, the launcher will set a boolean (foundation.e.blisslauncher.WIDGET_OPTION_DARK_TEXT) in the widget options to indicate whether if the dark text theme is enabled. The widget provider has to obtain the options by overriding onAppWidgetOptionsChanged and use it to style the widget accordingly.

Screenshots

Check list

  • Self review
  • Test procedure explained
  • Tested on fresh install
  • Tested applied as an update
  • License
  • Internal documentation
  • User documentation
Edited by Romain Hunault

Merge request reports

Loading