diff --git a/mobile/chrome/content/browser-ui.js b/mobile/chrome/content/browser-ui.js index 8bbe6e74b2e..6280f21ca7b 100644 --- a/mobile/chrome/content/browser-ui.js +++ b/mobile/chrome/content/browser-ui.js @@ -555,6 +555,21 @@ var BrowserUI = { } else { Elements.urlbarState.removeAttribute("tablet"); } + + // Tablet mode changes the size of the thumbnails + // in the tabs container. Hence we have to force a + // thumbnail update on all tabs. + setTimeout(function(self) { + self._updateAllTabThumbnails(); + }, 0, this); + }, + + _updateAllTabThumbnails: function() { + let tabs = Browser.tabs; + + tabs.forEach(function(tab) { + tab.updateThumbnail({ force: true }); + }); }, update: function(aState) { diff --git a/mobile/chrome/content/browser.xul b/mobile/chrome/content/browser.xul index 3080c7ca7cd..7e52d5fb84d 100644 --- a/mobile/chrome/content/browser.xul +++ b/mobile/chrome/content/browser.xul @@ -200,14 +200,14 @@ - - + - + diff --git a/mobile/chrome/content/tabs.xml b/mobile/chrome/content/tabs.xml index 566bfdb121e..f2b4144ca40 100644 --- a/mobile/chrome/content/tabs.xml +++ b/mobile/chrome/content/tabs.xml @@ -7,13 +7,13 @@ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - + - - - + onclick="document.getBindingParent(this)._onClick()" observes="bcast_urlbarState"/> + + + @@ -27,17 +27,41 @@ + + + + + + + 0) diff --git a/mobile/themes/core/browser.css b/mobile/themes/core/browser.css index 5e0fda73ffc..160fa39a752 100644 --- a/mobile/themes/core/browser.css +++ b/mobile/themes/core/browser.css @@ -986,6 +986,7 @@ documenttab[selected="true"] > stack > .documenttab-thumbnail { .documenttab-close-container { position: relative; left: -16px; + -moz-margin-start: -16px; -moz-margin-end: 49px; } diff --git a/mobile/themes/core/gingerbread/browser.css b/mobile/themes/core/gingerbread/browser.css index d92912e59d8..b19b241ed95 100644 --- a/mobile/themes/core/gingerbread/browser.css +++ b/mobile/themes/core/gingerbread/browser.css @@ -935,6 +935,7 @@ documenttab[selected="true"] > stack > .documenttab-thumbnail { .documenttab-close-container { position: relative; left: -16px; + -moz-margin-start: -16px; -moz-margin-end: 49px; } diff --git a/mobile/themes/core/gingerbread/images/close-active-tablet-hdpi.png b/mobile/themes/core/gingerbread/images/close-active-tablet-hdpi.png new file mode 100644 index 00000000000..1e616b6698a Binary files /dev/null and b/mobile/themes/core/gingerbread/images/close-active-tablet-hdpi.png differ diff --git a/mobile/themes/core/gingerbread/images/close-background-hdpi.png b/mobile/themes/core/gingerbread/images/close-background-hdpi.png new file mode 100644 index 00000000000..478e9c85e27 Binary files /dev/null and b/mobile/themes/core/gingerbread/images/close-background-hdpi.png differ diff --git a/mobile/themes/core/gingerbread/images/close-default-tablet-hdpi.png b/mobile/themes/core/gingerbread/images/close-default-tablet-hdpi.png new file mode 100644 index 00000000000..1e616b6698a Binary files /dev/null and b/mobile/themes/core/gingerbread/images/close-default-tablet-hdpi.png differ diff --git a/mobile/themes/core/gingerbread/images/close-inactive-tab-tablet-hdpi.png b/mobile/themes/core/gingerbread/images/close-inactive-tab-tablet-hdpi.png new file mode 100644 index 00000000000..fd8e46b0c15 Binary files /dev/null and b/mobile/themes/core/gingerbread/images/close-inactive-tab-tablet-hdpi.png differ diff --git a/mobile/themes/core/gingerbread/images/newtab-default-tablet-hdpi.png b/mobile/themes/core/gingerbread/images/newtab-default-tablet-hdpi.png new file mode 100644 index 00000000000..1d9d1ae2308 Binary files /dev/null and b/mobile/themes/core/gingerbread/images/newtab-default-tablet-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/browser.css b/mobile/themes/core/honeycomb/browser.css index 84d1207a3a2..dd4982a8d72 100644 --- a/mobile/themes/core/honeycomb/browser.css +++ b/mobile/themes/core/honeycomb/browser.css @@ -1019,6 +1019,7 @@ documenttab[selected="true"] > stack > .documenttab-thumbnail { .documenttab-close-container { position: relative; left: -16px; + -moz-margin-start: -16px; -moz-margin-end: 49px; } diff --git a/mobile/themes/core/honeycomb/images/close-active-hdpi.png b/mobile/themes/core/honeycomb/images/close-active-hdpi.png index 935b7555e4d..1f19cd10638 100644 Binary files a/mobile/themes/core/honeycomb/images/close-active-hdpi.png and b/mobile/themes/core/honeycomb/images/close-active-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/images/close-active-tablet-hdpi.png b/mobile/themes/core/honeycomb/images/close-active-tablet-hdpi.png new file mode 100644 index 00000000000..1e616b6698a Binary files /dev/null and b/mobile/themes/core/honeycomb/images/close-active-tablet-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/images/close-background-hdpi.png b/mobile/themes/core/honeycomb/images/close-background-hdpi.png new file mode 100644 index 00000000000..478e9c85e27 Binary files /dev/null and b/mobile/themes/core/honeycomb/images/close-background-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/images/close-default-hdpi.png b/mobile/themes/core/honeycomb/images/close-default-hdpi.png index 3961ad1baaa..7e4b9f7d8d8 100644 Binary files a/mobile/themes/core/honeycomb/images/close-default-hdpi.png and b/mobile/themes/core/honeycomb/images/close-default-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/images/close-default-tablet-hdpi.png b/mobile/themes/core/honeycomb/images/close-default-tablet-hdpi.png new file mode 100644 index 00000000000..1e616b6698a Binary files /dev/null and b/mobile/themes/core/honeycomb/images/close-default-tablet-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/images/close-inactive-tab-hdpi.png b/mobile/themes/core/honeycomb/images/close-inactive-tab-hdpi.png index 105d7852edd..77d71107fa1 100644 Binary files a/mobile/themes/core/honeycomb/images/close-inactive-tab-hdpi.png and b/mobile/themes/core/honeycomb/images/close-inactive-tab-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/images/close-inactive-tab-tablet-hdpi.png b/mobile/themes/core/honeycomb/images/close-inactive-tab-tablet-hdpi.png new file mode 100644 index 00000000000..fd8e46b0c15 Binary files /dev/null and b/mobile/themes/core/honeycomb/images/close-inactive-tab-tablet-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/images/newtab-default-hdpi.png b/mobile/themes/core/honeycomb/images/newtab-default-hdpi.png index aacf3b927b0..e71e89cd79b 100644 Binary files a/mobile/themes/core/honeycomb/images/newtab-default-hdpi.png and b/mobile/themes/core/honeycomb/images/newtab-default-hdpi.png differ diff --git a/mobile/themes/core/honeycomb/images/newtab-default-tablet-hdpi.png b/mobile/themes/core/honeycomb/images/newtab-default-tablet-hdpi.png new file mode 100644 index 00000000000..1d9d1ae2308 Binary files /dev/null and b/mobile/themes/core/honeycomb/images/newtab-default-tablet-hdpi.png differ diff --git a/mobile/themes/core/images/close-active-tablet-hdpi.png b/mobile/themes/core/images/close-active-tablet-hdpi.png new file mode 100644 index 00000000000..1e616b6698a Binary files /dev/null and b/mobile/themes/core/images/close-active-tablet-hdpi.png differ diff --git a/mobile/themes/core/images/close-background-hdpi.png b/mobile/themes/core/images/close-background-hdpi.png new file mode 100644 index 00000000000..478e9c85e27 Binary files /dev/null and b/mobile/themes/core/images/close-background-hdpi.png differ diff --git a/mobile/themes/core/images/close-default-tablet-hdpi.png b/mobile/themes/core/images/close-default-tablet-hdpi.png new file mode 100644 index 00000000000..1e616b6698a Binary files /dev/null and b/mobile/themes/core/images/close-default-tablet-hdpi.png differ diff --git a/mobile/themes/core/images/close-inactive-tab-tablet-hdpi.png b/mobile/themes/core/images/close-inactive-tab-tablet-hdpi.png new file mode 100644 index 00000000000..fd8e46b0c15 Binary files /dev/null and b/mobile/themes/core/images/close-inactive-tab-tablet-hdpi.png differ diff --git a/mobile/themes/core/images/newtab-default-tablet-hdpi.png b/mobile/themes/core/images/newtab-default-tablet-hdpi.png new file mode 100644 index 00000000000..1d9d1ae2308 Binary files /dev/null and b/mobile/themes/core/images/newtab-default-tablet-hdpi.png differ diff --git a/mobile/themes/core/jar.mn b/mobile/themes/core/jar.mn index eba240488e2..072914facd3 100644 --- a/mobile/themes/core/jar.mn +++ b/mobile/themes/core/jar.mn @@ -90,6 +90,7 @@ chrome.jar: skin/images/row-header-bg.png (images/row-header-bg.png) skin/images/console-default-hdpi.png (images/console-default-hdpi.png) skin/images/newtab-default-hdpi.png (images/newtab-default-hdpi.png) + skin/images/newtab-default-tablet-hdpi.png (images/newtab-default-tablet-hdpi.png) skin/images/tab-active-hdpi.png (images/tab-active-hdpi.png) skin/images/tab-inactive-hdpi.png (images/tab-inactive-hdpi.png) skin/images/tab-closed-hdpi.png (images/tab-closed-hdpi.png) @@ -110,8 +111,12 @@ chrome.jar: skin/images/unlocked-hdpi.png (images/unlocked-hdpi.png) skin/images/locked-hdpi.png (images/locked-hdpi.png) skin/images/close-default-hdpi.png (images/close-default-hdpi.png) + skin/images/close-default-tablet-hdpi.png (images/close-default-tablet-hdpi.png) skin/images/close-active-hdpi.png (images/close-active-hdpi.png) + skin/images/close-active-tablet-hdpi.png (images/close-active-tablet-hdpi.png) skin/images/close-inactive-tab-hdpi.png (images/close-inactive-tab-hdpi.png) + skin/images/close-inactive-tab-tablet-hdpi.png (images/close-inactive-tab-tablet-hdpi.png) + skin/images/close-background-hdpi.png (images/close-background-hdpi.png) skin/images/check-30.png (images/check-30.png) skin/images/search-glass-30.png (images/search-glass-30.png) skin/images/search-clear-30.png (images/search-clear-30.png) @@ -214,6 +219,7 @@ chrome.jar: skin/gingerbread/images/row-header-bg.png (gingerbread/images/row-header-bg.png) skin/gingerbread/images/console-default-hdpi.png (gingerbread/images/console-default-hdpi.png) skin/gingerbread/images/newtab-default-hdpi.png (gingerbread/images/newtab-default-hdpi.png) + skin/gingerbread/images/newtab-default-tablet-hdpi.png (gingerbread/images/newtab-default-tablet-hdpi.png) skin/gingerbread/images/tab-active-hdpi.png (gingerbread/images/tab-active-hdpi.png) skin/gingerbread/images/tab-inactive-hdpi.png (gingerbread/images/tab-inactive-hdpi.png) skin/gingerbread/images/tab-closed-hdpi.png (gingerbread/images/tab-closed-hdpi.png) @@ -233,8 +239,12 @@ chrome.jar: skin/gingerbread/images/unlocked-hdpi.png (gingerbread/images/unlocked-hdpi.png) skin/gingerbread/images/locked-hdpi.png (gingerbread/images/locked-hdpi.png) skin/gingerbread/images/close-default-hdpi.png (gingerbread/images/close-default-hdpi.png) + skin/gingerbread/images/close-default-tablet-hdpi.png (gingerbread/images/close-default-tablet-hdpi.png) skin/gingerbread/images/close-active-hdpi.png (gingerbread/images/close-active-hdpi.png) + skin/gingerbread/images/close-active-tablet-hdpi.png (gingerbread/images/close-active-tablet-hdpi.png) + skin/gingerbread/images/close-background-hdpi.png (gingerbread/images/close-background-hdpi.png) skin/gingerbread/images/close-inactive-tab-hdpi.png (gingerbread/images/close-inactive-tab-hdpi.png) + skin/gingerbread/images/close-inactive-tab-tablet-hdpi.png (gingerbread/images/close-inactive-tab-tablet-hdpi.png) skin/gingerbread/images/check-30.png (gingerbread/images/check-30.png) skin/gingerbread/images/search-glass-30.png (gingerbread/images/search-glass-30.png) skin/gingerbread/images/search-clear-30.png (gingerbread/images/search-clear-30.png) @@ -339,6 +349,7 @@ chrome.jar: skin/honeycomb/images/row-header-bg.png (honeycomb/images/row-header-bg.png) skin/honeycomb/images/console-default-hdpi.png (honeycomb/images/console-default-hdpi.png) skin/honeycomb/images/newtab-default-hdpi.png (honeycomb/images/newtab-default-hdpi.png) + skin/honeycomb/images/newtab-default-tablet-hdpi.png (honeycomb/images/newtab-default-tablet-hdpi.png) skin/honeycomb/images/tab-active-hdpi.png (honeycomb/images/tab-active-hdpi.png) skin/honeycomb/images/tab-inactive-hdpi.png (honeycomb/images/tab-inactive-hdpi.png) skin/honeycomb/images/tab-closed-hdpi.png (honeycomb/images/tab-closed-hdpi.png) @@ -359,8 +370,12 @@ chrome.jar: skin/honeycomb/images/unlocked-hdpi.png (honeycomb/images/unlocked-hdpi.png) skin/honeycomb/images/locked-hdpi.png (honeycomb/images/locked-hdpi.png) skin/honeycomb/images/close-default-hdpi.png (honeycomb/images/close-default-hdpi.png) + skin/honeycomb/images/close-default-tablet-hdpi.png (honeycomb/images/close-default-tablet-hdpi.png) skin/honeycomb/images/close-active-hdpi.png (honeycomb/images/close-active-hdpi.png) + skin/honeycomb/images/close-active-tablet-hdpi.png (honeycomb/images/close-active-tablet-hdpi.png) + skin/honeycomb/images/close-background-hdpi.png (honeycomb/images/close-background-hdpi.png) skin/honeycomb/images/close-inactive-tab-hdpi.png (honeycomb/images/close-inactive-tab-hdpi.png) + skin/honeycomb/images/close-inactive-tab-tablet-hdpi.png (honeycomb/images/close-inactive-tab-tablet-hdpi.png) skin/honeycomb/images/check-30.png (images/check-30.png) skin/honeycomb/images/check-selected-hdpi.png (honeycomb/images/check-selected-hdpi.png) skin/honeycomb/images/check-unselected-hdpi.png (honeycomb/images/check-unselected-hdpi.png) diff --git a/mobile/themes/core/tablet.css b/mobile/themes/core/tablet.css index e0410c2a7db..20e1198cc96 100644 --- a/mobile/themes/core/tablet.css +++ b/mobile/themes/core/tablet.css @@ -30,6 +30,70 @@ visibility: collapse; } +#tabs-container[tablet="true"] { + -moz-border-end: 0px; + background: #000; +} + +#tabs[tablet="true"] > scrollbox { + max-width: 200px; +} + +#tabs[tablet="true"] .tabs-list { + -moz-column-width: 200px; + -moz-padding-end: 0px; + -moz-padding-start: 0px; +} + +documenttab[tablet="true"] { + width: 200px; + padding: @padding_xxnormal@; + -moz-margin-start: 0px; + background: none; +} + +documenttab[tablet="true"][selected="true"] { + background: none; +} + +.documenttab-thumbnail[tablet="true"] { + border-radius: @border_radius_tiny@; +} + +.documenttab-close-container[tablet="true"] { + left: 0px; + -moz-margin-end: 0px; + -moz-margin-start: 135px; + -moz-box-pack: end; + -moz-box-align: center; +} + +documenttab[selected="true"] > stack > .documenttab-close-container[tablet="true"] { + background: url("chrome://browser/skin/images/close-background-hdpi.png"); + background-repeat: no-repeat; + background-position: right; + -moz-margin-end: -@padding_xxnormal@; + padding-right: 2px; +} + +.documenttab-close[tablet="true"] { + width: 30px; + height: 44px; + list-style-image: url("chrome://browser/skin/images/close-inactive-tab-tablet-hdpi.png"); +} + +documenttab[selected="true"] > stack > hbox > .documenttab-close[tablet="true"] { + list-style-image: url("chrome://browser/skin/images/close-default-tablet-hdpi.png"); +} + +.documenttab-close-container:hover:active > .documenttab-close[tablet="true"] { + list-style-image: url("chrome://browser/skin/images/close-active-tablet-hdpi.png"); +} + +#newtab-button[tablet="true"] { + list-style-image: url("images/newtab-default-tablet-hdpi.png"); +} + @media (@orientation@: portrait) { #toolbar-main[tablet="true"] > #tool-tabs { visibility: visible;