feat: E-ink theme#21371
Conversation
|
Important Maintainers: This PR contains Strings changes
|
Adds an initial implementation of a theme for E-ink display devices. It's designed to use mostly grayscale and high contrast colors Light mode only for now.
produced by editing the colors at "navigation_drawer_background.svg" on InkScape, then exporting it as a PNG, like the other nav_drawer_logo files
fd03998 to
2d2bd00
Compare
Assisted-by: Gemini 3.1 Pro
The stroke wasn't applied to the whole dialog
2d2bd00 to
e0ce67c
Compare
david-allison
left a comment
There was a problem hiding this comment.
I would strongly consider enabling 'safe display mode' when this is turned on.
My past comment on the padding of the bottom of the buttons remains (new study screen). Implementer's choice:
Only blocker is a decision on the UX for safe display mode.
I find the light/plain/e-ink distinction to be a little unusual, but don't immediately have a UI suggestion to fix it.
| ) | ||
| override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | ||
| binding = DialogTagsBinding.inflate(layoutInflater) | ||
| val builder = AlertDialog.Builder(requireActivity()) |
There was a problem hiding this comment.
These changes would be useful to split into a separate PR (or commit) if feasible
| val hasAttr = requireContext().theme.resolveAttribute(R.attr.studyScreenElevation, typedValue, true) | ||
| brushConfigPopup?.elevation = | ||
| if (hasAttr) { | ||
| TypedValue.complexToDimensionPixelSize(typedValue.data, resources.displayMetrics).toFloat() |
There was a problem hiding this comment.
use typedValue.getDimension(resources.displayMetrics) (and typedValue.type == TypedValue.TYPE_DIMENSION)
| return this | ||
| } | ||
|
|
||
| fun withColorAttr(attr: Int): BadgeDrawableBuilder { |
| return this | ||
| } | ||
|
|
||
| fun withColor(color: Int?): BadgeDrawableBuilder { |
| } | ||
| } | ||
|
|
||
| // ./gradlew :AnkiDroid:recordRoborazziPlayDebug -Pscreenshot -Ptheme=black,plain |
There was a problem hiding this comment.
is there a reason you omitted eink?
| <item name="learnCountColor">@color/black</item> | ||
| <item name="reviewCountColor">@color/black</item> | ||
| <item name="buryCountColor">@color/material_grey_700</item> | ||
| <item name="zeroCountColor">@color/material_grey_300</item> |
There was a problem hiding this comment.
nit: material_grey_300 doesn't meet WCAG for contrast (neither does the current theme, this isn't a break/blocking) - probably split this into an issue
Note
Assisted-by: Gemini 3.1 Pro - setting the background color on snackbars
Purpose / Description
Improves the accessibility on E-ink devices by adding a theme aimed at them.
It's basically a Black and white/Grayscale/High contrast theme, with thicker borders/dividers/strokes so components are easier to see.
It's okay to keep the color of some things like the flags, so the user can differentiate them at least a little even if the E-ink screen isn't colored. But there are things that I may have forgotten.
Please let me know if there is anything that should be changed to B/W before this is merged. Some things can be changed on later PRs as well
Approach
How does this change address the problem?
How Has This Been Tested?
Emulator 33
Screen_recording_20260714_154935.webm
I'll send the photos on an E-ink device later
Checklist
Please, go through these checks before submitting the PR.