Closed Bug 575403 Opened 14 years ago Closed 14 years ago

Create an Android theme for Fennec

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(fennec2.0b2+)

VERIFIED FIXED
Tracking Status
fennec 2.0b2+ ---

People

(Reporter: madhava, Assigned: mfinkle)

References

Details

Attachments

(31 files, 17 obsolete files)

50.01 KB, application/zip
Details
208.30 KB, image/png
Details
172.45 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
130.11 KB, patch
mbrubeck
: review+
Details | Diff | Splinter Review
3.29 KB, application/zip
Details
128.74 KB, application/zip
Details
1.07 KB, image/png
Details
6.20 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
2.62 KB, image/png
Details
7.83 KB, application/zip
Details
2.78 KB, application/zip
Details
11.33 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
1.88 KB, image/png
Details
1.89 KB, image/png
Details
1.55 KB, image/png
Details
4.51 KB, patch
mbrubeck
: review+
Details | Diff | Splinter Review
2.55 KB, image/png
Details
2.28 KB, image/png
Details
3.41 KB, image/png
Details
8.50 KB, application/zip
Details
1.72 KB, image/png
Details
1.02 KB, image/png
Details
1.03 KB, image/png
Details
11.08 KB, application/zip
Details
3.38 KB, patch
mbrubeck
: review+
Details | Diff | Splinter Review
3.34 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
6.56 KB, application/zip
Details
5.63 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
1.44 KB, image/png
Details
8.85 KB, application/zip
Details
14.80 KB, patch
mbrubeck
: review+
Details | Diff | Splinter Review
The current Fennec theme is an original creation, somewhat influenced by Maemo norms. We should create an Android specific theme for Fennec on Android devices that fits better there, while still maintaining some cross-platform Fennec distinctiveness.

Typically, we try to maintain glyphs/icons and overall layout across platforms, while altering button shape, colors, and textures to fit better with the host platform conventions.

As a starting point, here are some links to exemplar Android apps:

Twitter app UI example:
http://android-developers.blogspot.com/2010/05/twitter-for-android-closer-look-at.html

doubletwist media app:
http://blog.cocoia.com/2010/doubletwist-android-media-player-app/

Stock froyo UI:
http://smarterware.org/6085/android-2-2-screenshot-tour-my-favorite-features-in-froyo
Assignee: nobody → madhava
Hardware: x86 → ARM
Version: 1.9.2 Branch → Trunk
tracking-fennec: --- → 2.0+
Related: bug 570514 - Need status bar icons for Android
tracking-fennec: 2.0+ → 2.0b2+
Please take lower resolution phones into account in the design. I use the HTC Wildfire (240x320), and Fennec is unusable there because the UI elements are gigantic at that resolution - while any other app I use sizes itself appropriately.
Assignee: madhava → smartell
Depends on: 590777
More details about low-resolution display support in bug 590777.
Depends on: 590817
Attached patch wip (obsolete) — Splinter Review
* This patch is not a final version, it is not even a real wip *

This is just an experiment to see how far we could go by just tweaking the css and how much work the new theme required and the experiment is in a very very early stage, the only stuff I've play with is the background and the urlbar look for now (so not that much)
I've uploaded a page with the beginnings of converting my mockups to CSS. Disregard how I align the glyphs, elements, etc as it is hackish :)  This is merely a staging area for CSS styles to be incorporated into the working theme.

http://mozilla.seanmartell.com/fennec/fimo/androidUI/index.html

*** I'll update the page with more elements as they are created. ***
Attached patch wip v0.2 (obsolete) — Splinter Review
I've uploaded the patch to use the CSS from the page linked in the previous comment and it looks much better. I appreciate particularly that we use CSS now to style the left/right sides of the urlbar and not images anymore.
This has 3 benefits compare to what we do actually in my opinion:
 * this looks better :)
 * easier to maintain for the RTL cases
 * the fennec package will be a bit smaller

I can't wait to have the others part of the theme to update the patch!
Attachment #477461 - Attachment is obsolete: true
Attached image urlbar screenshot (obsolete) —
Screenshot with the css from Martell's mockup.
Attachment #477462 - Attachment is obsolete: true
Attached patch wip - v0.3 (obsolete) — Splinter Review
The only things style by this patch is the main front-end view (screenshots can let think more is done)
Attachment #478284 - Attachment is obsolete: true
Attachment #478286 - Attachment is obsolete: true
Attached patch wip-0.3 - enhance (obsolete) — Splinter Review
Same patch as previous but with a few more tweaks
Attachment #479817 - Attachment is obsolete: true
Attached patch Patch - part 1 - chrome border (obsolete) — Splinter Review
This patch change the CSS and icons for the permanent non-moving chrome UI.
This mean the patch does _not_ tweak (yet):
 * panels (awesome results, preferences, downloads, etc...)
 * Alert/Prompt/Confirm/Notification... popups
 * Site menu
 * Open Search list
Attachment #480103 - Attachment is obsolete: true
Attached image Screenshots - part 1
The screenshot illustrate the previous comment.
Attachment #479818 - Attachment is obsolete: true
Attachment #479819 - Attachment is obsolete: true
Attached patch Patch - part 1 - chrome border (obsolete) — Splinter Review
fix a small bug with the feedback panel.
Attachment #480644 - Attachment is obsolete: true
you can indeed.

re: the styles - looking good!  for the Prefs pane, the background behind the title "Preferences" should be the blue color all the way throughout, not grey.
(In reply to comment #20)

> re: the styles - looking good!  for the Prefs pane, the background behind the
> title "Preferences" should be the blue color all the way throughout, not grey.

The "Preferences" row be going away in bug 601048. But if it stays, it will be styled as you mentioned.
Patch updated on trunk.

As seen on IRC it would make life easier if instead of having one bug for all the theme refactoring we could have a few:
 * chrome side borders (this one)
 * Site Menu / Open Search Menu
 * Every other popups
 * Inner right panels
 * Awesome results

This would help everyone figure out what's wrong in each part and also allow different people to work on different parts.

I will open bugs for that
Assignee: smartell → 21
Attachment #480668 - Attachment is obsolete: true
Attachment #481246 - Flags: review?(mark.finkle)
Just so that the mockups are referenced somewhere in the bug, they're here:
http://www.flickr.com/photos/madhava_work/sets/72157624962763028/detail/
Comment on attachment 481246 [details] [diff] [review]
Patch - part 1 - chrome border - updated

* Wondering if we can come up with a simpler name for "browser-control-button"
* Do we still need "page-button", "panel-button" and "button-image" classes?
* Can you unbitrot the patch please?
(In reply to comment #25)
> * Wondering if we can come up with a simpler name for "browser-control-button"

I have renamed the class to button-control to stays in the same naming convention as button-dark, button-text; ...

> * Do we still need "page-button", "panel-button" and "button-image" classes?

Removed, it still stays a block of CSS for the navigations button of find/form helper that will be removed once we will have icons for those 2 buttons.

> * Can you unbitrot the patch please?

Done.
Attachment #481246 - Attachment is obsolete: true
Attachment #481469 - Flags: review?(mark.finkle)
Attachment #481246 - Flags: review?(mark.finkle)
Comment on attachment 481469 [details] [diff] [review]
Patch - part 1 - chrome border v0.2

>diff --git a/chrome/content/browser.xul b/chrome/content/browser.xul

>             <notificationbox id="addons-messages" flex="1">
>               <richlistbox id="addons-list" flex="1" onselect="ExtensionsView.hideOnSelect(event)">
>-                <label id="addons-list-header" class="panel-header" value="&addonsHeader.label;"/>

You are removing the "Add-ons" panel-header here. Madhava wants to keep it.

>-                <richlistitem id="addons-local" class="section-header" align="center" nohighlight="true">
>+                <richlistitem id="addons-local" class="panel-header section-header" align="center" nohighlight="true">

Don't use "panel-header" for the "Your add-ons" section header.

-----
Remove the geo-16.png and geo-16.png.orig images

r+ with nits fixed
Attachment #481469 - Flags: review?(mark.finkle) → review+
This one address comments and also include a few fixes for RTL and correct a bug with the calculation of tabs columns count (this is a bit dirty and can be enhance later in my opinion)
Attachment #481469 - Attachment is obsolete: true
Attachment #481585 - Flags: review?(mark.finkle)
Attachment #481585 - Flags: review?(mark.finkle) → review+
File a followup bug for the XXX (use of constants)
http://hg.mozilla.org/mobile-browser/rev/f316a2ba79f9

Filled bug 602669 for the XXX.
Filled bug 602671 for styling the Site Menu / Open Search Menu
Filled bug 602674 for styling the other popups
Filled bug 602675 for styling the inner right panels
Filled bug 602677 for styling the awesome results
No longer blocks: 602669, 602671, 602674, 602675, 602677
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Txul increase 23.2% on Nokia n900 mobile

The patch has been backouted, we're looking Txul to see if it was guilty
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Pretty the same patch as before except:
 * no more gradients on the right/left/top bar for the moment
 * less shadow
    - no more shadown above the urlbar
    - some inset shadow/gradient of the urlbar have been factorized
 * some images have been stripped down
 * remove unuseful images
 * rename some :active:hover to :hover:active since this what we use commonly
Attachment #481751 - Flags: review?(mark.finkle)
Comment on attachment 481751 [details] [diff] [review]
Patch - part 1 - chrome border v0.4

Let's land this and see the talos effects.
Attachment #481751 - Flags: review?(mark.finkle) → review+
Comment on attachment 481751 [details] [diff] [review]
Patch - part 1 - chrome border v0.4

I'd like to review this for efficient CSS selectors, ala https://developer.mozilla.org/en/writing_efficient_css
Attachment #481751 - Flags: review?(mbrubeck)
Comment on attachment 481751 [details] [diff] [review]
Patch - part 1 - chrome border v0.4

This is just a list of all the potential selector improvements I found.  You
or Mark can choose which ones are worth the trouble to fix.  I noted which
ones appeared to be most important.

>+++ b/themes/core/browser.css

>+#urlbar-container .urlbar-cap-button {
>+#urlbar-container .urlbar-cap-button[open="true"],
>+#urlbar-container .urlbar-cap-button:hover:active {

Remove the "#urlbar-container" descendant selector if possible, or replace
with child selectors.

>+#urlbar-icons > #tool-reload {
>+#urlbar-icons > #tool-stop {
>+#urlbar-icons > #tool-search {

Get rid of the child selector unless it is necessary.

>+#content-stack > div:-moz-focusring {
>+  outline: 0 !important;
> }

Give the div an ID and remove the child selector.  (Requires a match for every
<div> but fortunately we don't have many divs.)

> #tabs > * {

Unrelated to this patch, but we really need to replace this universal
selector.  (Very important because it will do a test for *every* element.)

>+#content-navigator > hbox > toolbarbutton {

Add a class and use a simple class selector.  (Important because it requires a
child selector test for every <toolbarbutton>.)

>+++ b/themes/core/platform.css

>+.toggle-dark:not([disabled=true]) radio:hover:active,
> .toggle-dark radio[selected] {
> .toggle-dark radio:first-child {
> .toggle-dark radio:first-child:-moz-locale-dir(rtl) {
>+.toggle-dark:not([disabled=true]) radio:first-child:hover:active,
> .toggle-dark radio:first-child[selected] {
>+.toggle-dark:not([disabled=true]) radio:first-child:hover:active:-moz-locale-dir(rtl),
> .toggle-dark radio:first-child[selected]:-moz-locale-dir(rtl) {
> .toggle-dark radio:last-child {
> .toggle-dark radio:last-child:-moz-locale-dir(rtl) {
>+.toggle-dark:not([disabled=true]) radio:last-child:hover:active,
> .toggle-dark radio:last-child[selected] {
>+.toggle-dark:not([disabled=true]) radio:last-child:hover:active:-moz-locale-dir(rtl),
> .toggle-dark radio:last-child[selected]:-moz-locale-dir(rtl) {
> .toggle-dark radio:first-child:last-child {
>+.toggle-dark:not([disabled=true]) radio:first-child:last-child:hover:active,
> .toggle-dark radio:first-child:last-child[selected] {

Would be faster with child selectors.  (Existing problem, not caused by this
patch.  Important because it requires a slow descendant test for every
<radio>.)

>+.panel-row-header > toolbarbutton {

Add a class, use a simple class selector.  (Important because it requires
a child test for every <toolbarbutton>.)

>+.panel-row-header > toolbarbutton.choice-all {
>+.panel-row-header > toolbarbutton.choice-bookmarks {
>+.panel-row-header > toolbarbutton.choice-history {
>+.panel-row-header > toolbarbutton.choice-remotetabs {

Remove the "toolbarbutton" from these selectors.  Could also replace the child
selector with a new class as in the previous note.

>+  .panel-row-header > toolbarbutton .toolbarbutton-text {
>+.panel-row-header > toolbarbutton .toolbarbutton-text {
>+.panel-row-header > toolbarbutton .toolbarbutton-text:-moz-locale-dir(rtl) {
>+.panel-row-header > toolbarbutton[disabled="true"] .toolbarbutton-icon {
>+.panel-row-header > toolbarbutton[disabled="true"] .toolbarbutton-text {
>+.panel-row-header > toolbarbutton[disabled="true"] .toolbarbutton-icon {
>+.panel-row-header > toolbarbutton[disabled="true"] .toolbarbutton-text {

Descendant selectors. Use all child selectors if possible.
Attachment #481751 - Flags: review?(mbrubeck) → review-
Thanks for your opinion Matt, I will try to fix some in a new version of the patch, I will ignore those related to toggle since this will probably take places into the bug for styling the right panels.
Comment on attachment 481751 [details] [diff] [review]
Patch - part 1 - chrome border v0.4

>+.panel-row-header > toolbarbutton .toolbarbutton-text {
>+  text-align: left;
>+  text-shadow: rgba(0,0,0,0.3) 0 2px;
>+}

>+.panel-row-header > toolbarbutton .toolbarbutton-text:-moz-locale-dir(rtl) {
>+  text-align: right;
>+}

>+.panel-row-header > toolbarbutton[disabled="true"] .toolbarbutton-text {
>+  color: #aaa;
>+}

>+.panel-row-header > toolbarbutton[disabled="true"] .toolbarbutton-text {
>+  color: #aaa;
>+}

I just realised, for rules like these I think you can use CSS inheritance and get rid of the ".toolbarbutton-text" part.  If you do this, then you can also speed things up even more if you replace "toolbarbutton" with a class.  For example:

 <toolbarbutton class="panel-row-header-button">

 .panel-row-header-button[disabled="true"] {
   color: #aaa;
 }

Also, the last rule above appears to be duplicated.
Attached patch latest unbitrotted (obsolete) — Splinter Review
Just unbitrotted
Attachment #481751 - Attachment is obsolete: true
This patch further strips Vivien's second patch and makes many of the CSS selector changes Matt wanted.

I want to land this, even temporarily, to see the performance hit.
Assignee: 21 → mark.finkle
Attachment #483572 - Attachment is obsolete: true
Attachment #483601 - Flags: review?(mbrubeck)
Uploaded the wrong patch
Attachment #483601 - Attachment is obsolete: true
Attachment #483606 - Flags: review?(mbrubeck)
Attachment #483601 - Flags: review?(mbrubeck)
Comment on attachment 483606 [details] [diff] [review]
real test patch (no gradients and shadows)

This looks fine for test purposes.
Attachment #483606 - Flags: review?(mbrubeck) → review+
Attached file hdpi panel arrows
We landed this:
http://hg.mozilla.org/mobile-browser/rev/f52b5b45c047

But I wouldn't say it's fixed yet. We have some cleanup and minimal changes to add first - for beta 2. We also have some fixes for the identity panel in bug 602671, also for beta 2.

Once we do some cleanup, this can be marked fixed.
Attached file hdpi pngs
sliced up all the gradients etc to add as bgs to the elements. shadowed bevels within elements added to the bg PNGs now, so they can be removed as box-shadow in code. ping me in IRC for specific border colors for any elements that require drop shadows, or, if we can perhaps re-use those current inset box-shadows as outset ones for the element dropshadows.
Attached image inactive tab bg
The patch uses sean's gradient images for the urlbar and the sidebars
Attachment #484009 - Flags: review?(mark.finkle)
This patch fix a bug discovered by Matt when the window is in landscape mode
Attachment #484009 - Attachment is obsolete: true
Attachment #484018 - Flags: review?(mark.finkle)
Attachment #484009 - Flags: review?(mark.finkle)
Attached image bookmarked star PNG
now in autumn yellows.
Comment on attachment 484018 [details] [diff] [review]
Patch v0.2 - part 1 - chrome sidebars and urlbar gradients

Let's rename xxxBackground.png -> xxx-bg.png

example:
urlbarBackground.png -> urlbar-bg.png
Attachment #484018 - Flags: review?(mark.finkle) → review+
Blocks: 604946
pushed vivien's patch with my nits and the new star image:
http://hg.mozilla.org/mobile-browser/rev/1e23824fbd7e
The patch use the images for panel rows and the new bookmarked and remote-tab images for the awesomepanel.
Attachment #484277 - Flags: review?(mark.finkle)
Comment on attachment 484277 [details] [diff] [review]
Patch - part 1 - chrome panel row

Use "-hdpi.png" on the images that were added. It's the new way we will separate images used for high and medium resolution devices.

Watch Twinopen after landing, as usual.
Attachment #484277 - Flags: review?(mark.finkle) → review+
Adds stop button and renames reload button
Attachment #484380 - Flags: review?(mbrubeck)
Attachment #484380 - Flags: review?(mbrubeck) → review+
Depends on: 605544
we should match the seperator stylings here: http://grab.by/6WBJ

so having the #cacdd5 lines on the top/bottom of the seperator gradient.
Attached image EV default gradient
Attached image SSL default gradient
Attached file blue color shift fix
thre were odd color shifts in the blue colors, coming out purple.

fixed PNGs attached
(In reply to comment #69)
> thre were odd color shifts in the blue colors, coming out purple.
> 
> fixed PNGs attached

Pushed the new blue tab background in bug 602671.  (The other purple images were not checked in yet; we'll use the fixed versions when we get to them.)
Depends on: 602671
the fixed blue versions are attached on this bug.  what other ones are you referring to?
(In reply to comment #71)
> the fixed blue versions are attached on this bug.  what other ones are you
> referring to?

I'm referring to the ones attached to this bug in attachment 484486 [details].

The old version of the tab background was in the tree already, so I replaced it with the fixed version.  The other images (SSL gradient, toggle background, etc.) weren't in the tree yet (the code to use them is still in progress).  When we do check them in, we'll use the fixed versions from this bug.
This patch use sean's bacground image for the pressed state of sidebars buttons
Attachment #484802 - Flags: review?(mbrubeck)
Use the provided background image for the urlbar edit state and the find bar
Attachment #484814 - Flags: review?(mark.finkle)
Comment on attachment 484802 [details] [diff] [review]
Patch - part 1 - chrome sidebars buttons pressed state

We need to force these buttons to have a height of 82px also, so the background looks right.  Sean asked for this in http://etherpad.mozilla.com:9000/Y2VnicnWbz

r+ with that change.
Attachment #484802 - Flags: review?(mbrubeck) → review+
Comment on attachment 484814 [details] [diff] [review]
patch: search box background

search-bar-bg-hdpi.png -> textbox-bg.png

we can add the -hdpi to all of them in a different cleanup patch
Attachment #484814 - Flags: review?(mark.finkle) → review+
(In reply to comment #76)
> search-bar-bg-hdpi.png -> textbox-bg.png

Done, and pushed: http://hg.mozilla.org/mobile-browser/rev/900a08cb4eeb
(In reply to comment #75)
> Comment on attachment 484802 [details] [diff] [review]
> Patch - part 1 - chrome sidebars buttons pressed state
> 
> We need to force these buttons to have a height of 82px also, so the background
> looks right.  Sean asked for this in
> http://etherpad.mozilla.com:9000/Y2VnicnWbz
> 
> r+ with that change.

done and pushed:
http://hg.mozilla.org/mobile-browser/rev/daad3a3c3b84
Attached file Larry color icons
thought these were uploaded to the bug.  sorry.
Attached patch patch (obsolete) — Splinter Review
This adds some details I missed in the previous texbox background patch:
* Use the new background for the urlbar active state.
* Use the new background for the add-on search box too, as suggested in http://etherpad.mozilla.com:9000/Y2VnicnWbz
Attachment #484853 - Flags: review?(mark.finkle)
Attachment #484853 - Flags: review?(mark.finkle) → review+
Apply this to the select-helper search box too, and use a class to do it.
Attachment #484853 - Attachment is obsolete: true
Attachment #484860 - Flags: review?(mark.finkle)
Attached image Larry closed lock
Comment on attachment 484860 [details] [diff] [review]
Search bar background tweaks, v2

remove textbox.search-bar from browxer.css
Attachment #484860 - Flags: review?(mark.finkle) → review+
(In reply to comment #83)
> remove textbox.search-bar from browxer.css

Done: http://hg.mozilla.org/mobile-browser/rev/2650df3f1c91
Attached file task icons
This patch just replaces the old images with the new ones.
Attachment #485138 - Flags: review?(mbrubeck)
Comment on attachment 485138 [details] [diff] [review]
task buttons for desktop and maemo

>-  skin/images/task-back-40.png              (images/task-back-40.png)
>-  skin/images/task-back-rtl-40.png          (images/task-back-rtl-40.png)
>+  skin/images/task-back-hdpi.png            (images/task-back-hdpi.png)
>+  skin/images/task-back-rtl-hdpi.png        (images/task-back-rtl-hdpi.png)

Some styles are still using task-back-40(-rtl).png.  See #tool-panel-close, which should be updated, and #tool-bookmarks-close, which can be removed along with the "bookmarklist" and "bookark-items" styles.

r+ with those changes.
Attachment #485138 - Flags: review?(mbrubeck) → review+
removed unused styles and fixed task-back-40(-rtl).png references. also reduced the left/right padding in urlbar (with OK from madhava)

pushed:
http://hg.mozilla.org/mobile-browser/rev/56a5fabbb9d2

marking FIXED, open new bugs for remaining issues
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Add testcases as need Aaron! If there aren't any needed, then please feel free to minus this.
Flags: in-litmus?(aaron.train)
(In reply to comment #89)
> Add testcases as need Aaron! If there aren't any needed, then please feel free
> to minus this.

That's not something I know the answer to.
Larry not changing colors is being tracked in bug 575950
video controls are being tracked in bug 465839

Verified : 
Mozilla/5.0 (Maemo;Linux armv71; rv:2.0b8pre) Gecko/20101022 Firefox/4.0b8pre Fennec/4.0b2pre
Mozilla/5.0 (Android; Linux armv71; rv2.0b8pre) Gecko/20101022 Firefox/4.0b8pre Fennec/4.0b2pre
Status: RESOLVED → VERIFIED
Depends on: 612978
No longer depends on: 612978
Depends on: 618989
Flags: in-litmus?(aaron.train)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: