Bug 515768: Fennec needs a task switch button in titlebar for n900 (UI), r=gavin

This commit is contained in:
Mark Finkle 2009-09-23 12:09:44 -04:00
parent 5bf9b649da
commit 174224540d
9 changed files with 26 additions and 11 deletions

View File

@ -603,6 +603,13 @@ var BrowserUI = {
panelUI.hidden = true;
},
switchTask: function switchTask() {
try {
let phone = Cc["@mozilla.org/phone/support;1"].createInstance(Ci.nsIPhoneSupport);
phone.switchTask();
} catch(e) { }
},
handleEvent: function (aEvent) {
switch (aEvent.type) {
// Browser events

View File

@ -201,6 +201,9 @@
<box id="toolbar-container" class="panel-dark">
<box id="toolbar-moveable-container">
<toolbar id="toolbar-main" class="panel-dark">
#ifdef MOZ_PLATFORM_HILDON
<toolbarbutton id="tool-app-switch" class="button-image" oncommand="BrowserUI.switchTask();"/>
#endif
<hbox id="urlbar-container" flex="1">
<box id="identity-box"
onclick="getIdentityHandler().handleIdentityButtonEvent(event);"

View File

@ -65,12 +65,19 @@ toolbarbutton.urlbar-button {
margin-left: 1mm; /* core spacing */
}
#tool-app-switch {
visibility: hidden;
margin-right: 1mm; /* core spacing */
list-style-image: url("chrome://browser/skin/images/task-switch-40.png");
}
#toolbar-main[fullscreen="true"] #tool-app-switch {
visibility: visible;
}
#tool-app-close {
visibility: hidden;
min-height: 0 !important;
min-width: 0 !important;
margin-top: -40px; /* keep pixels */
list-style-image: url("chrome://browser/skin/images/fullscreen-close-40.png");
list-style-image: url("chrome://browser/skin/images/task-close-40.png");
}
#toolbar-main[fullscreen="true"] #tool-app-close {
@ -79,7 +86,7 @@ toolbarbutton.urlbar-button {
#toolbar-main[dialog="true"] #tool-app-close {
visibility: visible;
list-style-image: url("chrome://browser/skin/images/fullscreen-up-40.png");
list-style-image: url("chrome://browser/skin/images/task-back-40.png");
}
/* URL bar cap buttons */
@ -414,10 +421,7 @@ toolbarbutton.page-button {
/* URL List and autocomplete navigation popup ------------------------------ */
#tool-bookmarks-close {
min-height: 0 !important;
min-width: 0 !important;
margin-top: -40px; /* keep pixels */
list-style-image: url("chrome://browser/skin/images/fullscreen-up-40.png");
list-style-image: url("chrome://browser/skin/images/task-back-40.png");
}
#bookmarklist-container {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -85,10 +85,11 @@ chrome.jar:
images/unlock-40.png (images/unlock-40.png)
images/close-30.png (images/close-30.png)
images/check-30.png (images/check-30.png)
images/fullscreen-close-40.png (images/fullscreen-close-40.png)
images/fullscreen-up-40.png (images/fullscreen-up-40.png)
images/search-glass-30.png (images/search-glass-30.png)
images/search-clear-30.png (images/search-clear-30.png)
images/section-expanded-16.png (images/section-expanded-16.png)
images/section-collapsed-16.png (images/section-collapsed-16.png)
images/task-switch-40.png (images/task-switch-40.png)
images/task-close-40.png (images/task-close-40.png)
images/task-back-40.png (images/task-back-40.png)
images/geo-16.png (images/geo-16.png)