Closed
Bug 808663
Opened 12 years ago
Closed 12 years ago
Downscale awesome-bar row Favicons from 32dip to 16dip
Categories
(Firefox for Android Graveyard :: Awesomescreen, defect)
Tracking
(firefox16 affected, firefox17 affected, firefox18 affected, firefox19 verified, firefox20 verified)
VERIFIED
FIXED
Firefox 19
People
(Reporter: aaronmt, Assigned: wesj)
References
Details
Attachments
(4 files, 5 obsolete files)
17.78 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
5.70 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
7.23 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
5.94 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
Currently the [1] ImageView used for awesome bar_rows and [2] in the browser-toolbar are upscaling 16x16 Favicons to 32x12 resulting in really poorly prominently displayed graphics in-product.
These look extremely bad on high-end high-resolution devices like the Galaxy Note II where no other browser or Android application has this issue.
I have built Fennec with this value change and it is much nicer.
Can we please downscale Favicons to 16dip?
[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/resources/layout/awesomebar_row.xml#17
[2] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/resources/layout/browser_toolbar.xml.in#75
Reporter | ||
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
I think we should avoid varying favicon sizes as it wouldn't look good, especially on the awesome screen. So, my suggestion is to always show favicons in a 32dip *area* but avoid scaling them up by adding a surrounding border using the dominant color as background (or something like this). Ian, what do you think?
Comment 3•12 years ago
|
||
I see a few options here.
1. Find a way to not anti-alias icons when we scale them up, so that even if we use 16px favicons we can still show sharp pixels, not blurry edges: http://cl.ly/image/161r311M2l2W. However I've been trying to make this happen for about a year and a half though, and we can't seem to do it for whatever reason ;)
2. As Lucas suggested, scale favicons down to 16dip, but keep them in a 32x32 area. We might consider styling this with some kind of neutral background or border.
3. Building on #2, use 16dip favicons, and place them on a dominant colour background, choosing the colour in the same way we choose the "android home screen bookmark" background colour.
--
Each of these options have their own strengths and tradeoffs, so ideally we should see if we can prototype all 3 of them, and then make a call on what is the best fix.
Reporter | ||
Comment 4•12 years ago
|
||
Whatever works :-)
I just really cant stand seeing Favicons as is (for many months) right now, especially since they're so in-your-face in-product.
Assignee | ||
Comment 6•12 years ago
|
||
Ian, what do you think of this? I'll post the patch in a sec, but I'm not sure this is great....
Assignee | ||
Comment 7•12 years ago
|
||
Patch to scale favicons without filtering them (nearest neighbor). I also applied this to the urlbar favicon too. I think this looks better, but that we might be good to reduce their size in the awesomescreen as well. Right now they're 32dip. Maybe 24dip? Easier to fix with this patch. I'll try it and post a screenshot!
Attachment #678843 -
Flags: review?(bnicholson)
Comment 8•12 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #6)
> I'm not sure this is great....
Yeah. It's better, but not great either. Definitely still worth trying the options 2 and 3 from comment 3, where we see how 16dip favicons look.
Assignee | ||
Comment 9•12 years ago
|
||
Hmm.. 24 isn't great either: https://dl.dropbox.com/u/72157/device-2012-11-06-123124.png
I'll play with some background things behind that.
Comment 10•12 years ago
|
||
I just opened the 24 one on my phone, and it actually looks half decent. Let's keep it on the table as one option.
Comment 11•12 years ago
|
||
Comment on attachment 678843 [details] [diff] [review]
Patch
+ if (image != null) {
+ if (mFaviconSize > 0) {
+ image = Bitmap.createScaledBitmap(image, mFaviconSize, mFaviconSize, false);
+ }
Do we need this > 0 check? The constructor should always initialize mFaviconSize, so unless getDimension() is somehow returning a negative value, I don't see how mFaviconSize could ever be negative.
+ protected void updateFavicon(ImageView faviconView, Bitmap bitmap) {
+ if (bitmap == null) {
+ faviconView.setImageDrawable(null);
+ } else {
+ if (mFaviconSize > 0) {
+ bitmap = Bitmap.createScaledBitmap(bitmap, mFaviconSize, mFaviconSize, false);
+ }
Same here. The could would be a bit simpler if we didn't have these checks (and we wouldn't need the extra updateFavicon() method you're adding).
Comment 12•12 years ago
|
||
(In reply to Brian Nicholson (:bnicholson) from comment #11)
> Same here. The could would be a bit simpler if we didn't have these checks
s/The could/The code/
Assignee | ||
Comment 13•12 years ago
|
||
No we don't. I was just trying to use view.getWidth() for awhile, which is sometimes zero and will crash. So I left the safety checks in, but we shouldn't need them using the dimens approach.
Assignee | ||
Comment 14•12 years ago
|
||
Playing with the homescreen background:
https://dl.dropbox.com/u/72157/home1.png - white background
https://dl.dropbox.com/u/72157/home2.png - no (well.. technically #3999)
We can reverse the overlay so that its below the icon too. For now its on top of the favicon.
Getting the dominant color is doable, but will take a bit more work to do right, we should calculate and store it when we first fetch the icon. Ideas ian?
Comment 15•12 years ago
|
||
Comment on attachment 678843 [details] [diff] [review]
Patch
r+ with the mFaviconSize checks removed.
One other nit:
According to http://source.android.com/source/code-style.html#follow-field-naming-conventions, static field names should start with "s", so I'd rename it to sFaviconSize.
Attachment #678843 -
Flags: review?(bnicholson) → review+
Comment 16•12 years ago
|
||
I assume we are waiting for Ian to report back on the preferred option?
Comment 17•12 years ago
|
||
... and can someone update the summary of this bug?
Assignee | ||
Comment 18•12 years ago
|
||
This seems like an improvement regardless. I can land it alone and we can leave this open for any further work we want to do?
Just backed up with patches that have bounced that I'm trying to sort out.
Assignee | ||
Comment 19•12 years ago
|
||
Whiteboard: [leave open]
Comment 20•12 years ago
|
||
Comment 21•12 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #14)
> Playing with the homescreen background:
>
> https://dl.dropbox.com/u/72157/home1.png - white background
> https://dl.dropbox.com/u/72157/home2.png - no (well.. technically #3999)
>
> We can reverse the overlay so that its below the icon too. For now its on
> top of the favicon.
>
> Getting the dominant color is doable, but will take a bit more work to do
> right, we should calculate and store it when we first fetch the icon. Ideas
> ian?
Why not simply adding the borders and save the new image in the db instead of the original favicon? I like the white borders as a starting point btw. I'd probably only show it on smaller favicons though (16dip). No border is needed if the favicon can fill the 32dip space without scaling up.
Reporter | ||
Comment 22•12 years ago
|
||
Getting there. The filtering removal is good but the 32dp on all these 16x16's still look the same.
Comment 23•12 years ago
|
||
Hey guys -- I'm working on some simplified visual designs for the favicon backgrounds, will post when they're ready.
In the mean time, of the screenshots so far, I am happiest with Wes's 24dip favicons with no background colour in comment 9. I think putting a background image behind them could work, but I agree with Lucas that I would use smaller 16dip icons in this case.
Anyway designs are coming soon, just wanted to keep people up to date since there is a lot of discussion happening here.
Assignee | ||
Comment 24•12 years ago
|
||
This moves the icons to 24dip. It also changes the scaleType since we're now doing the scaling manually ourselves (I want to ensure that Android doesn't do extra work).
Attachment #679174 -
Flags: review?(bnicholson)
Assignee | ||
Comment 25•12 years ago
|
||
I'm just putting this up to save it or in case someone else wants to play with it. It adds background behind the icons (but not when they are saved like Lucas suggested above).
Reporter | ||
Updated•12 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Updated•12 years ago
|
Keywords: reproducible
QA Contact: aaron.train
Comment 26•12 years ago
|
||
Hey folks, let's try this: I adapted the look we use in our add-ons and downloads panel, where we float an icon in the middle of a neutral coloured background - http://cl.ly/image/2f1J0m2P213G
favicons are 16dip in size, and the background colour is #e3e7ed
(I tried ones where we sampled the dominant colour, but it just looked too overwhelming)
Comment 27•12 years ago
|
||
Correction. After some deliberation in IRC, we are going to go with an alternate that I came up with earlier: http://cl.ly/image/2m143B0a3a2F
Still using 16dip favicons, but set inside a 32dip #fafbfc square with a 1dp corner radius.
Assignee | ||
Comment 28•12 years ago
|
||
White background. Screenshot on an SIII:
https://dl.dropbox.com/u/72157/home3.png
Attachment #679175 -
Attachment is obsolete: true
Attachment #681110 -
Flags: review?(bnicholson)
Assignee | ||
Comment 29•12 years ago
|
||
Just noticed that our search engine icons for some reason aren't resized.
Comment 30•12 years ago
|
||
before you change that, can you send me a build? I'd be interested to see if having a different sized icon for search is useful at all.
Comment 31•12 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #29)
> Just noticed that our search engine icons for some reason aren't resized.
They use awesomebar_suggestion_row.xml, so you'll have to change that layout too.
Assignee | ||
Comment 32•12 years ago
|
||
Fixes up search icons. I needed a bitmap, and it seems a bit like a waste to use a Drawable for these anyway? A build without this patch is at:
https://dl.dropbox.com/u/72157/fennec-favicons.apk
Attachment #679174 -
Attachment is obsolete: true
Attachment #679174 -
Flags: review?(bnicholson)
Attachment #681150 -
Flags: review?(bnicholson)
Comment 33•12 years ago
|
||
Comment on attachment 681150 [details] [diff] [review]
Patch 2/2
Have you tried this with different sites using the "Add Search Engine" feature for text boxes? Without the try/catch here, I wonder if we'd hit any problems if the favicon is corrupt (or if there's no favicon at all for the search engine).
Attachment #681150 -
Flags: review?(bnicholson) → review+
Comment 34•12 years ago
|
||
This is looking good.
Request from myself and Stephen Horlander (who has been thinking about favicons for far longer than I have) -- Is there a way we can use the 16dip size, but if we have larger favicons available, to scale those to 32dip?
While I worry that it might make the list look janky, Stephen makes a good point that we will continue to want larger favicons from web providers, and that any kind of evangelism or support we can provide might compel more people to make them.
Assignee | ||
Comment 35•12 years ago
|
||
Final fixup. This only scales up the icon if its bigger than 16px (not 16dip) and hides/shows the background image. I also added a try-catch around the search icon stuff because it was there before. Pulling and building to test that still.
Attachment #678374 -
Attachment is obsolete: true
Attachment #678838 -
Attachment is obsolete: true
Attachment #679154 -
Attachment is obsolete: true
Attachment #682176 -
Flags: review?(bnicholson)
Updated•12 years ago
|
Attachment #681110 -
Flags: review?(bnicholson) → review+
Updated•12 years ago
|
Attachment #682176 -
Flags: review?(bnicholson) → review+
Assignee | ||
Comment 36•12 years ago
|
||
Comment 37•12 years ago
|
||
Reporter | ||
Updated•12 years ago
|
status-firefox20:
--- → affected
Updated•12 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Keywords: reproducible,
uiwanted
Resolution: --- → FIXED
Whiteboard: [leave open]
Target Milestone: --- → Firefox 19
Comment 38•12 years ago
|
||
The favicons are changed as expected on the latest Nightly and Aurora builds. Closing bug as verified fixed on:
Firefox 20.0a1 (2012-11-27)
Device: Galaxy Nexus
OS: Android 4.1.1
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•