Closed Bug 1389164 Opened 7 years ago Closed 7 years ago

[photon] Light text in toolbar is unreadable when using dark lightweight theme on Android

Categories

(Firefox for Android Graveyard :: Theme and Visual Design, defect)

57 Branch
defect
Not set
normal

Tracking

(firefox57 verified)

VERIFIED FIXED
Firefox 57
Tracking Status
firefox57 --- verified

People

(Reporter: mbrubeck, Assigned: jwu)

References

Details

(Whiteboard: [FNC][SPT57.2][BL])

Attachments

(3 files)

Attached image screenshot (deleted) —
When using a lightweight theme with a black or very dark background color, grey text in the address bar is displayed against a gray background, making it unreadable.
We would use this bug to track the new design of lightweight theme on Photon.
Whiteboard: [FNC][SPT57.2][BL]
Attached image Screenshot_20170818-152507.png (deleted) —
Same issue with tab titles on tablets, when applying a dark theme. See screenshot.
Assignee: nobody → topwu.tw
Comment on attachment 8901048 [details] Bug 1389164 - Support new lightweight theme design on Photon. https://reviewboard.mozilla.org/r/172522/#review177812
Attachment #8901048 - Flags: review?(cnevinchen) → review+
Comment on attachment 8901048 [details] Bug 1389164 - Support new lightweight theme design on Photon. https://reviewboard.mozilla.org/r/172522/#review178018 ::: mobile/android/base/java/org/mozilla/gecko/lwt/LightweightThemeDrawable.java:37 (Diff revision 1) > private final Bitmap mBitmap; > private final Resources mResources; > > private int mStartColor; > private int mEndColor; > + private boolean mHorizontal; mHorizontalGradient? and we even don't need this member, if we change to `initializeBitmapShader(final boolean horizontalGradient)` ::: mobile/android/base/java/org/mozilla/gecko/lwt/LightweightThemeDrawable.java:108 (Diff revision 1) > mColorPaint = new Paint(mPaint); > mColorPaint.setColor(color); > mColorPaint.setColorFilter(new PorterDuffColorFilter(filter, PorterDuff.Mode.SRC_OVER)); > } > > /** we should update and move this doc to below `setAlpha(..., ..., ...)` ::: mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java:944 (Diff revision 1) > final int color = ContextCompat.getColor(view.getContext(), colorResID); > > final LightweightThemeDrawable drawable = theme.getColorDrawable(view, color); > if (drawable != null) { > - drawable.setAlpha(LIGHTWEIGHT_THEME_ALPHA, LIGHTWEIGHT_THEME_ALPHA); > + if (HardwareUtils.isTablet()) { > + drawable.setAlpha(LIGHTWEIGHT_THEME_INVERT_ALPHA_TABLET, LIGHTWEIGHT_THEME_INVERT_ALPHA_TABLET); ``` final boolean horizontalGradient = !HardwareUtils.isTablet(); drawable.setAlpha(....., horizontalGradient); ``` will it provide more sematic?
Attachment #8901048 - Flags: review?(walkingice0204) → review+
Comment on attachment 8901048 [details] Bug 1389164 - Support new lightweight theme design on Photon. https://reviewboard.mozilla.org/r/172522/#review178018 > mHorizontalGradient? and we even don't need this member, if we change to `initializeBitmapShader(final boolean horizontalGradient)` `initializeBitmapShader()` is also called in `onBoundsChange()`, which is a callback function, therefore we cannot pass horizontalGradient as a parameter to it. Just like mBitmap, mStartColor, mEndColor, etc, mHorizontalGradient is stored as a class field.
Pushed by topwu.tw@gmail.com: https://hg.mozilla.org/integration/autoland/rev/a0e215d6e8fc Support new lightweight theme design on Photon. r=nechen,walkingice
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Verified as fixed in Nightly 57 (2017-08-29). Devices: HTC Nexus 9 (Android 7.1.1) Prestigio Grace X5 (Android 4.4.2) Oneplus Two (Android 6.0.1)
Status: RESOLVED → VERIFIED
Depends on: 1414309
Blocks: 1414503
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: