feat: E-ink theme - #21371
Conversation
|
Important Maintainers: This PR contains Strings changes
|
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
There was a problem hiding this comment.
Removed them from this PR. I'll leave it to the future
| 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)
| } | ||
| } | ||
|
|
||
| // ./gradlew :AnkiDroid:recordRoborazziPlayDebug -Pscreenshot -Ptheme=black,plain |
There was a problem hiding this comment.
is there a reason you omitted eink?
There was a problem hiding this comment.
it's just an example of how to use the command.
| <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
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
ea8b8c6 to
bd6385c
Compare
|
Snapshot diff report vs
All 1 changed screenshotsPreferencesScreenshotTest
|
Assisted-by: Gemini 3.1 Pro
bd6385c to
c2906c4
Compare
I don't want the padding to look different among themes. Only the colors should be different |
c2906c4 to
f7e178c
Compare

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.