Bug 658319 - Use mozmm for Fennec chrome theme on all platforms [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Fri, 09 Sep 2011 17:01:42 -0700
changeset 76857 d18ca8ae27627fb64e661c0c8611573b936d772f
parent 76856 b08c94bd7f2e85a33292c7fec8d5a1c65e9cce89
child 76858 2945d9f513628e7b28582d127fd3645ad1108d76
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersmfinkle
bugs658319
milestone9.0a1
Bug 658319 - Use mozmm for Fennec chrome theme on all platforms [r=mfinkle]
mobile/app/mobile.js
mobile/themes/core/defines.inc
mobile/themes/core/gingerbread/defines.inc
mobile/themes/core/honeycomb/defines.inc
--- a/mobile/app/mobile.js
+++ b/mobile/app/mobile.js
@@ -69,16 +69,23 @@ pref("toolkit.screen.lock", false);
 pref("zoom.minPercent", 20);
 pref("zoom.maxPercent", 400);
 pref("toolkit.zoomManager.zoomValues", ".2,.3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3,4");
 
 // Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
 pref("browser.viewport.scaleRatio", -1);
 pref("browser.viewport.desktopWidth", 980);
 
+#ifndef ANDROID
+#ifndef MOZ_PLATFORM_MAEMO
+// On desktop builds, simulate an MDPI tablet by default.
+pref("layout.css.dpi", 160);
+#endif
+#endif
+
 /* allow scrollbars to float above chrome ui */
 pref("ui.scrollbarsCanOverlapContent", 1);
 
 /* use long press to display a context menu */
 pref("ui.click_hold_context_menus", true);
 
 /* cache prefs */
 pref("browser.cache.disk.enable", false);
--- a/mobile/themes/core/defines.inc
+++ b/mobile/themes/core/defines.inc
@@ -1,11 +1,10 @@
 %filter substitution
 
-%ifdef ANDROID
 %define font_xlarge 5.08mozmm
 %define font_xnormal 2.75mozmm
 %define font_normal 2.54mozmm
 %define font_snormal 2.33mozmm
 %define font_small 1.91mozmm
 %define font_xsmall 1.69mozmm
 %define font_tiny 1.48mozmm
 %define font_xtiny 1.27mozmm
@@ -84,106 +83,16 @@
 
 %define dialog_width 76.2mozmm
 
 %define appmenu_portrait_height 21.17mozmm
 %define appmenu_button_height  10.48mozmm
 
 %define tablet_panel_controls  40mozmm
 %define tablet_panel_minwidth  124mozmm
-%else
-%define font_xlarge 48px
-%define font_xnormal 26px
-%define font_normal 24px
-%define font_snormal 22px
-%define font_small 18px
-%define font_xsmall 16px
-%define font_tiny 14px
-%define font_xtiny 12px
-
-%define touch_row 70px
-%define touch_button_xlarge 72px
-%define touch_button_large 64px
-%define touch_button_small 56px
-%define touch_action_minwidth 200px
-%define touch_normal 64px
-
-%define margin_context_popup 32px
-%define margin_large 24px
-%define margin_xxxnormal 16px
-%define margin_xnormal 10px
-%define margin_normal 8px
-%define margin_snormal 6px
-%define margin_small 4px
-%define margin_tiny 2px
-%define margin_xtiny 1px
-
-%define padding_xlarge 32px
-%define padding_large 24px
-%define padding_xxxnormal 16px
-%define padding_xxnormal 12px
-%define padding_xnormal 10px
-%define padding_normal 8px
-%define padding_snormal 6px
-%define padding_small 4px
-%define padding_xsmall 2px
-%define padding_tiny 1px
-
-%define border_width_xlarge 4px
-%define border_width_large 3px
-%define border_width_small 2px
-%define border_width_tiny 1px
-
-%define border_radius_normal 8px
-%define border_radius_small 6px
-%define border_radius_tiny 2px
-
-%define shadow_width_xlarge 10px
-%define shadow_width_large 6px
-%define shadow_width_small 2px
-
-%define textbox_height 48px
-
-%define dropmarker_margin 5px
-
-%define progressmeter_height 32px
-
-%define urlbar_edit_height 60px
-%define urlbar_edit_indent 8px
-%define urlbar_max_width 596px
-
-%define scroller_thickness 6px
-%define scroller_minimum 12px
-
-%define sidebar_width_minimum 80px
-%define sidebar_button_height 70px
-%define documenttab_margin_bottom 5px
-
-%define placelabel_padding 80px
-%define placeitem_padding 40px
-
-%define autocomplete_item_container_image_padding 5px
-%define autocomplete_item_container_position 2px
-%define autocomplete_item_container_size 26px
-%define autocomplete_item_container_padding 48px
-
-%define autocomplete_item_subtitle_margin 26px
-%define autocomplete_item_label_margin 30px
-%define autocomplete_item_tags_margin 32px
-
-%define autocompleteresult_padding 5px
-
-%define dialog_width 500px
-
-%define appmenu_portrait_height 200px
-%define appmenu_button_height 99px
-
-%define tablet_panel_controls  270px
-%define tablet_panel_minwidth  1024px
-%endif
 
 %ifdef MOZ_PLATFORM_MAEMO
 %define orientation -moz-device-orientation
 %elifdef ANDROID
 %define orientation -moz-device-orientation
 %else
 %define orientation orientation
 %endif
--- a/mobile/themes/core/gingerbread/defines.inc
+++ b/mobile/themes/core/gingerbread/defines.inc
@@ -21,17 +21,16 @@
 
 %define color_background_highlight #febc2b
 %define color_background_highlight_overlay rgba(254, 188, 43, 0.8)
 %define color_text_highlight #000
 
 %define color_subtext_default lightgray
 %define color_subtext_inverse #414141
 
-%ifdef ANDROID
 %define font_xlarge 5.08mozmm
 %define font_xnormal 2.75mozmm
 %define font_normal 2.54mozmm
 %define font_snormal 2.33mozmm
 %define font_small 1.91mozmm
 %define font_xsmall 1.69mozmm
 %define font_tiny 1.48mozmm
 %define font_xtiny 1.27mozmm
@@ -112,108 +111,16 @@
 
 %define dialog_width 76.2mozmm
 
 %define appmenu_portrait_height 21.17mozmm
 %define appmenu_button_height  10.48mozmm
 
 %define tablet_panel_controls  40mozmm
 %define tablet_panel_minwidth  124mozmm
-%else
-%define font_xlarge 48px
-%define font_xnormal 26px
-%define font_normal 24px
-%define font_snormal 22px
-%define font_small 18px
-%define font_xsmall 16px
-%define font_tiny 14px
-%define font_xtiny 12px
-
-%define touch_row 70px
-%define touch_button_xlarge 72px
-%define touch_button_large 64px
-%define touch_button_small 56px
-%define touch_button_minwidth 112px
-%define touch_action_minwidth 200px
-%define touch_normal 64px
-
-%define margin_context_popup 32px
-%define margin_large 24px
-%define margin_xxxnormal 16px
-%define margin_xnormal 10px
-%define margin_normal 8px
-%define margin_snormal 6px
-%define margin_small 4px
-%define margin_tiny 2px
-%define margin_xtiny 1px
-
-%define padding_xlarge 32px
-%define padding_large 24px
-%define padding_xxxnormal 16px
-%define padding_xxnormal 12px
-%define padding_xnormal 10px
-%define padding_normal 8px
-%define padding_snormal 6px
-%define padding_small 4px
-%define padding_xsmall 2px
-%define padding_tiny 1px
-
-%define border_width_xxlarge 6px
-%define border_width_xlarge 4px
-%define border_width_large 3px
-%define border_width_small 2px
-%define border_width_tiny 1px
-
-%define border_radius_normal 8px
-%define border_radius_small 6px
-%define border_radius_tiny 2px
-
-%define shadow_width_xlarge 10px
-%define shadow_width_large 6px
-%define shadow_width_small 2px
-
-%define textbox_height 48px
-
-%define dropmarker_margin 5px
-
-%define progressmeter_height 32px
-
-%define urlbar_edit_height 60px
-%define urlbar_edit_indent 8px
-%define urlbar_max_width 596px
-
-%define scroller_thickness 6px
-%define scroller_minimum 12px
-
-%define sidebar_width_minimum 80px
-%define sidebar_button_height 70px
-%define documenttab_margin_bottom 8px
-
-%define placelabel_padding 80px
-%define placeitem_padding 40px
-
-%define autocomplete_item_container_image_padding 5px
-%define autocomplete_item_container_position 2px
-%define autocomplete_item_container_size 26px
-%define autocomplete_item_container_padding 48px
-
-%define autocomplete_item_subtitle_margin 26px
-%define autocomplete_item_label_margin 30px
-%define autocomplete_item_tags_margin 32px
-
-%define autocompleteresult_padding 5px
-
-%define dialog_width 500px
-
-%define appmenu_portrait_height 200px
-%define appmenu_button_height 99px
-
-%define tablet_panel_controls  270px
-%define tablet_panel_minwidth  801px
-%endif
 
 %ifdef MOZ_PLATFORM_MAEMO
 %define orientation -moz-device-orientation
 %elifdef ANDROID
 %define orientation -moz-device-orientation
 %else
 %define orientation orientation
 %endif
--- a/mobile/themes/core/honeycomb/defines.inc
+++ b/mobile/themes/core/honeycomb/defines.inc
@@ -32,17 +32,16 @@
 %define color_selection #c0e49a
 %define color_shadow #6699ff
 %define color_shadow_light rgba(102,153,255, 0.2)
 %define color_shadow_green rgba(137,251,21, 0.2)
 %define color_shadow_grey rgba(200,200,200, 0.5)
 
 %define color_subtext_default #aaaaaa
 
-%ifdef ANDROID
 %define font_xlarge 6.08mozmm
 %define font_xnormal 3.75mozmm
 %define font_normal 3.54mozmm
 %define font_snormal 3mozmm
 %define font_small 2.91mozmm
 %define font_xsmall 2.69mozmm
 %define font_tiny 2.48mozmm
 %define font_xtiny 2.27mozmm
@@ -126,111 +125,16 @@
 
 %define dialog_width 76.2mozmm
 
 %define appmenu_portrait_height 21.17mozmm
 %define appmenu_button_height  10.48mozmm
 
 %define tablet_panel_controls  40mozmm
 %define tablet_panel_minwidth  124mozmm
-%else
-%define font_xlarge 48px
-%define font_xnormal 26px
-%define font_normal 24px
-%define font_snormal 20px
-%define font_small 18px
-%define font_xsmall 16px
-%define font_tiny 14px
-%define font_xtiny 12px
-
-%define touch_row 70px
-%define touch_button_xlarge 72px
-%define touch_button_large 64px
-%define touch_button_small 56px
-%define touch_button_minwidth 112px
-%define touch_action_minwidth 200px
-%define touch_normal 64px
-
-%define margin_context_popup 32px
-%define margin_large 24px
-%define margin_xxxnormal 16px
-%define margin_xnormal 10px
-%define margin_normal 8px
-%define margin_snormal 6px
-%define margin_small 4px
-%define margin_tiny 2px
-%define margin_xtiny 1px
-
-%define padding_xlarge 32px
-%define padding_large 24px
-%define padding_xxxnormal 16px
-%define padding_xxnormal 12px
-%define padding_xnormal 10px
-%define padding_normal 8px
-%define padding_snormal 6px
-%define padding_small 4px
-%define padding_xsmall 2px
-%define padding_tiny 1px
-
-%define border_width_xxlarge 6px
-%define border_width_xlarge 4px
-%define border_width_large 3px
-%define border_width_small 2px
-%define border_width_tiny 1px
-
-%define border_radius_normal 8px
-%define border_radius_small 6px
-%define border_radius_tiny 2px
-
-%define shadow_width_xlarge 15px
-%define shadow_width_large 6px
-%define shadow_width_medium 4px
-%define shadow_width_small 2px
-%define shadow_width_tiny 1px
-
-%define textbox_height 48px
-
-%define dropmarker_margin 5px
-
-%define progressmeter_height 32px
-
-%define urlbar_edit_height 60px
-%define urlbar_edit_indent 8px
-%define urlbar_max_width 596px
-
-%define scroller_thickness 6px
-%define scroller_minimum 12px
-
-%define sidebar_width_minimum 80px
-%define sidebar_button_height 70px
-%define documenttab_margin_bottom 8px
-
-%define placelabel_padding 80px
-%define placeitem_padding 40px
-
-%define awesome_header_maxwidth 100px
-%define autocomplete_item_container_image_padding 5px
-%define autocomplete_item_container_position 2px
-%define autocomplete_item_container_size 26px
-%define autocomplete_item_container_padding 48px
-
-%define autocomplete_item_subtitle_margin 26px
-%define autocomplete_item_label_margin 30px
-%define autocomplete_item_tags_margin 32px
-
-%define autocompleteresult_padding 5px
-
-%define dialog_width 500px
-
-%define appmenu_portrait_height 200px
-%define appmenu_button_height 99px
-
-%define tablet_panel_controls  270px
-%define tablet_panel_minwidth  801px
-%endif
 
 %ifdef MOZ_PLATFORM_MAEMO
 %define orientation -moz-device-orientation
 %elifdef ANDROID
 %define orientation -moz-device-orientation
 %else
 %define orientation orientation
 %endif