зеркало из https://github.com/mozilla/gecko-dev.git
Bug 892241 - Change - NewUI - Disable extraneous UI elements when on start screen. r=mbrubeck
--HG-- extra : rebase_source : 582f36a246323cbb0e0c29e8db61081375abaa44
This commit is contained in:
Родитель
ce8c269b00
Коммит
ea9c6bf9a5
|
@ -148,6 +148,10 @@ var Appbar = {
|
|||
}
|
||||
},
|
||||
|
||||
onAutocompleteCloseButton: function () {
|
||||
Elements.autocomplete.closePopup();
|
||||
},
|
||||
|
||||
dispatchContextualAction: function(aActionName){
|
||||
let activeTileset = this.activeTileset;
|
||||
if (activeTileset && ('isBound' in this.activeTileset)) {
|
||||
|
|
|
@ -45,6 +45,7 @@ let Elements = {};
|
|||
["toolbar", "toolbar"],
|
||||
["browsers", "browsers"],
|
||||
["navbar", "navbar"],
|
||||
["autocomplete", "urlbar-autocomplete"],
|
||||
["contextappbar", "contextappbar"],
|
||||
["findbar", "findbar"],
|
||||
["contentViewport", "content-viewport"],
|
||||
|
@ -550,13 +551,12 @@ var BrowserUI = {
|
|||
break;
|
||||
case "metro_viewstate_changed":
|
||||
this._adjustDOMforViewState();
|
||||
let autocomplete = document.getElementById("urlbar-autocomplete");
|
||||
if (aData == "snapped") {
|
||||
FlyoutPanelsUI.hide();
|
||||
autocomplete.setAttribute("orient", "vertical");
|
||||
Elements.autocomplete.setAttribute("orient", "vertical");
|
||||
}
|
||||
else {
|
||||
autocomplete.setAttribute("orient", "horizontal");
|
||||
Elements.autocomplete.setAttribute("orient", "horizontal");
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -259,17 +259,14 @@
|
|||
<hbox id="progress-control" />
|
||||
</hbox>
|
||||
|
||||
<vbox id="toolbar-autocomplete" flex="1">
|
||||
<vbox id="toolbar-overlay" flex="1">
|
||||
<!-- Autocomplete -->
|
||||
<scrollbox flex="1">
|
||||
<hbox id="urlbar-autocomplete" observes="bcast_windowState"/>
|
||||
</scrollbox>
|
||||
|
||||
<!-- Main toolbar -->
|
||||
<toolbar id="toolbar" flex="1">
|
||||
<observes element="bcast_windowState" attribute="*"/>
|
||||
<observes element="bcast_urlbarState" attribute="*"/>
|
||||
|
||||
<toolbar id="toolbar" flex="1" observes="bcast_windowState">
|
||||
<toolbarbutton id="back-button" class="appbar-primary"
|
||||
command="cmd_back"/>
|
||||
<toolbarbutton id="forward-button" class="appbar-primary"
|
||||
|
@ -296,14 +293,28 @@
|
|||
command="cmd_stop"/>
|
||||
</hbox>
|
||||
|
||||
<toolbarbutton id="download-button" class="appbar-secondary"
|
||||
oncommand="Appbar.onDownloadButton()"/>
|
||||
<toolbarbutton id="star-button" class="appbar-primary" type="checkbox"
|
||||
oncommand="Appbar.onStarButton()"/>
|
||||
<toolbarbutton id="pin-button" class="appbar-primary" type="checkbox"
|
||||
oncommand="Appbar.onPinButton()"/>
|
||||
<toolbarbutton id="menu-button" class="appbar-primary"
|
||||
oncommand="Appbar.onMenuButton(event)"/>
|
||||
<stack id="toolbar-contextual">
|
||||
<observes element="bcast_windowState" attribute="*"/>
|
||||
<observes element="bcast_urlbarState" attribute="*"/>
|
||||
|
||||
<hbox id="toolbar-context-page" pack="end">
|
||||
<toolbarbutton id="download-button" class="appbar-secondary"
|
||||
oncommand="Appbar.onDownloadButton()"/>
|
||||
<toolbarbutton id="star-button" class="appbar-primary"
|
||||
type="checkbox"
|
||||
oncommand="Appbar.onStarButton()"/>
|
||||
<toolbarbutton id="pin-button" class="appbar-primary"
|
||||
type="checkbox"
|
||||
oncommand="Appbar.onPinButton()"/>
|
||||
<toolbarbutton id="menu-button" class="appbar-primary"
|
||||
oncommand="Appbar.onMenuButton(event)"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="toolbar-context-autocomplete" pack="end">
|
||||
<toolbarbutton id="close-button" class="appbar-secondary"
|
||||
oncommand="Appbar.onAutocompleteCloseButton()"/>
|
||||
</hbox>
|
||||
</stack>
|
||||
</toolbar>
|
||||
</vbox>
|
||||
</appbar>
|
||||
|
@ -371,10 +382,16 @@
|
|||
<textbox id="findbar-textbox" type="search"
|
||||
oncommand="FindHelperUI.search(this.value)"
|
||||
oninput="FindHelperUI.updateCommands(this.value); "/>
|
||||
<button class="previous-button" command="cmd_findPrevious"/>
|
||||
<button class="next-button" command="cmd_findNext"/>
|
||||
|
||||
<toolbarbutton id="findbar-previous-button" class="appbar-secondary"
|
||||
command="cmd_findPrevious"/>
|
||||
<toolbarbutton id="findbar-next-button" class="appbar-secondary"
|
||||
command="cmd_findNext"/>
|
||||
|
||||
<spacer flex="1"/>
|
||||
<button id="findbar-close" class="close-button" command="cmd_findClose"/>
|
||||
|
||||
<toolbarbutton id="findbar-close-button" class="appbar-secondary"
|
||||
command="cmd_findClose"/>
|
||||
</appbar>
|
||||
|
||||
<!-- Context button bar -->
|
||||
|
|
|
@ -73,7 +73,7 @@ gTests.push({
|
|||
yield waitForEvent(Elements.findbar, "transitionend");
|
||||
is(Elements.findbar.isShowing, true, "Show find bar with menu item");
|
||||
|
||||
EventUtils.synthesizeMouse(document.getElementById("findbar-close"), 1, 1, {});
|
||||
EventUtils.synthesizeMouse(document.getElementById("findbar-close-button"), 1, 1, {});
|
||||
yield waitForEvent(Elements.findbar, "transitionend");
|
||||
is(Elements.findbar.isShowing, false, "Hide find bar with close button");
|
||||
|
||||
|
|
|
@ -483,10 +483,12 @@ documenttab[selected] .documenttab-selection {
|
|||
|
||||
/* Toolbar ----------------------------------------------------------------- */
|
||||
|
||||
#toolbar-autocomplete {
|
||||
#toolbar-overlay {
|
||||
background-color: @panel_light_color@;
|
||||
}
|
||||
|
||||
/* Combined back/forward buttons */
|
||||
|
||||
#back-button {
|
||||
list-style-image: url(chrome://browser/skin/images/navbar-back.png);
|
||||
position: relative;
|
||||
|
@ -584,6 +586,7 @@ documenttab[selected] .documenttab-selection {
|
|||
|
||||
/* Combined stop-reload button */
|
||||
.urlbar-button {
|
||||
margin: 0;
|
||||
-moz-image-region: rect(0px, 30px, 30px, 0px);
|
||||
}
|
||||
|
||||
|
@ -673,20 +676,33 @@ documenttab[selected] .documenttab-selection {
|
|||
visibility: collapse;
|
||||
}
|
||||
|
||||
/* Application-Specific */
|
||||
/* Contextual toolbar controls */
|
||||
|
||||
#toolbar-context-autocomplete,
|
||||
#toolbar-context-page {
|
||||
transition-property: opacity, visibility;
|
||||
transition-duration: @forward_transition_length@;
|
||||
transition-timing-function: @metro_animation_easing@;
|
||||
}
|
||||
|
||||
#toolbar-contextual:not([autocomplete]) #toolbar-context-autocomplete,
|
||||
#toolbar-contextual[startpage] #toolbar-context-page,
|
||||
#toolbar-contextual[autocomplete] #toolbar-context-page {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#download-button {
|
||||
-moz-image-region: rect(0px, 40px, 40px, 0px) !important;
|
||||
}
|
||||
#download-button:hover {
|
||||
#download-button:hover:not(:active) {
|
||||
-moz-image-region: rect(40px, 40px, 80px, 0px) !important;
|
||||
}
|
||||
#download-button:active {
|
||||
-moz-image-region: rect(80px, 40px, 120px, 0px) !important;
|
||||
}
|
||||
|
||||
/* Page-Specific */
|
||||
|
||||
#pin-button {
|
||||
list-style-image: url(chrome://browser/skin/images/navbar-pin.png);
|
||||
}
|
||||
|
@ -727,6 +743,18 @@ documenttab[selected] .documenttab-selection {
|
|||
}
|
||||
}
|
||||
|
||||
#close-button {
|
||||
-moz-image-region: rect(0px, 480px, 40px, 440px);
|
||||
}
|
||||
|
||||
#close-button:hover:not(:active) {
|
||||
-moz-image-region: rect(40px, 480px, 80px, 440px);
|
||||
}
|
||||
|
||||
#close-button:active {
|
||||
-moz-image-region: rect(80px, 480px, 120px, 440px);
|
||||
}
|
||||
|
||||
/* Panel UI ================================================================ */
|
||||
|
||||
#panel-container {
|
||||
|
@ -802,88 +830,23 @@ documenttab[selected] .documenttab-selection {
|
|||
#findbar {
|
||||
background-color: @metro_orange@;
|
||||
padding: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#findbar > toolbar {
|
||||
min-height: @findbar_height@ !important;
|
||||
}
|
||||
|
||||
#findbar > .previous-button,
|
||||
#findbar > .next-button,
|
||||
#findbar > .close-button {
|
||||
list-style-image: url(chrome://browser/skin/images/appbar-icons.png);
|
||||
min-width: @touch_button_small@ !important; /* button size */
|
||||
min-height: @touch_button_small@ !important; /* button size */
|
||||
border: none !important;
|
||||
background-image: none !important;
|
||||
background-color: inherit !important;
|
||||
pointer-events: auto;
|
||||
-moz-user-focus: ignore !important;
|
||||
margin: 0 @margin_normal@ !important;
|
||||
}
|
||||
|
||||
#findbar > .close-button {
|
||||
-moz-margin-start: 0;
|
||||
-moz-image-region: rect(0px, 480px, 40px, 440px);
|
||||
}
|
||||
|
||||
#findbar > .close-button:hover {
|
||||
-moz-image-region: rect(40px, 480px, 80px, 440px);
|
||||
}
|
||||
|
||||
#findbar > .close-button:active {
|
||||
-moz-image-region: rect(80px, 480px, 120px, 440px);
|
||||
}
|
||||
|
||||
#findbar > .previous-button {
|
||||
-moz-margin-end: 0;
|
||||
-moz-image-region: rect(0px, 400px, 40px, 360px);
|
||||
}
|
||||
|
||||
#findbar > .previous-button:hover {
|
||||
-moz-image-region: rect(40px, 400px, 80px, 360px);
|
||||
}
|
||||
|
||||
#findbar > .previous-button:active{
|
||||
-moz-image-region: rect(80px, 400px, 120px, 360px);
|
||||
}
|
||||
|
||||
#findbar > .next-button {
|
||||
-moz-margin-start: 0;
|
||||
-moz-image-region: rect(0px, 440px, 40px, 400px);
|
||||
}
|
||||
|
||||
#findbar > .next-button:hover {
|
||||
-moz-image-region: rect(40px, 440px, 80px, 400px);
|
||||
}
|
||||
|
||||
#findbar > .next-button:active {
|
||||
-moz-image-region: rect(80px, 440px, 120px, 400px);
|
||||
}
|
||||
|
||||
#findbar-textbox {
|
||||
pointer-events: auto;
|
||||
-moz-margin-end: 0;
|
||||
border: none !important;
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
.textbox-search-icon {
|
||||
list-style-image: url("chrome://browser/skin/images/search-glass-30.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
/* Override the default box ordering and make the find textbox appear to the
|
||||
right of the icon */
|
||||
#findbar-textbox input {
|
||||
-moz-box-ordinal-group: 2
|
||||
}
|
||||
|
||||
#findbar-textbox deck {
|
||||
margin-right: @margin_normal@;
|
||||
}
|
||||
|
||||
#findbar-textbox[status="1"] { /* Ci.nsITypeAheadFind.FIND_NOTFOUND */
|
||||
background: rgb(255,200,200);
|
||||
}
|
||||
|
@ -892,6 +855,47 @@ documenttab[selected] .documenttab-selection {
|
|||
background: #8db8d8;
|
||||
}
|
||||
|
||||
.textbox-search-icon {
|
||||
list-style-image: url("chrome://browser/skin/images/search-glass-30.png");
|
||||
-moz-image-region: auto;
|
||||
}
|
||||
|
||||
#findbar-previous-button {
|
||||
-moz-image-region: rect(0px, 400px, 40px, 360px);
|
||||
}
|
||||
|
||||
#findbar-previous-button:hover:not(:active) {
|
||||
-moz-image-region: rect(40px, 400px, 80px, 360px);
|
||||
}
|
||||
|
||||
#findbar-previous-button:active {
|
||||
-moz-image-region: rect(80px, 400px, 120px, 360px);
|
||||
}
|
||||
|
||||
#findbar-next-button {
|
||||
-moz-image-region: rect(0px, 440px, 40px, 400px);
|
||||
}
|
||||
|
||||
#findbar-next-button:hover:not(:active) {
|
||||
-moz-image-region: rect(40px, 440px, 80px, 400px);
|
||||
}
|
||||
|
||||
#findbar-next-button:active {
|
||||
-moz-image-region: rect(80px, 440px, 120px, 400px);
|
||||
}
|
||||
|
||||
#findbar-close-button {
|
||||
-moz-image-region: rect(0px, 480px, 40px, 440px);
|
||||
}
|
||||
|
||||
#findbar-close-button:hover:not(:active) {
|
||||
-moz-image-region: rect(40px, 480px, 80px, 440px);
|
||||
}
|
||||
|
||||
#findbar-close-button:active {
|
||||
-moz-image-region: rect(80px, 480px, 120px, 440px);
|
||||
}
|
||||
|
||||
/* Contextual appbar ======================================================= */
|
||||
|
||||
#contextualactions-tray {
|
||||
|
|
|
@ -709,7 +709,7 @@ appbar[visible] {
|
|||
bottom @appbar_keyboard_slideup_duration@ @metro_animation_easing@;
|
||||
}
|
||||
|
||||
appbar toolbar > toolbarbutton {
|
||||
appbar toolbar toolbarbutton {
|
||||
border: 0;
|
||||
margin: 0 @toolbar_horizontal_spacing@;
|
||||
padding: 0;
|
||||
|
@ -717,7 +717,7 @@ appbar toolbar > toolbarbutton {
|
|||
background-color: transparent;
|
||||
}
|
||||
|
||||
appbar toolbar > toolbarbutton[disabled] {
|
||||
appbar toolbar toolbarbutton[disabled] {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
|
@ -725,11 +725,11 @@ appbar toolbar[labelled] {
|
|||
min-height: @labelled_toolbar_height@;
|
||||
}
|
||||
|
||||
appbar toolbar[labelled] > toolbarbutton {
|
||||
appbar toolbar[labelled] toolbarbutton {
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
||||
appbar toolbar[labelled] > toolbarbutton > .toolbarbutton-text {
|
||||
appbar toolbar[labelled] toolbarbutton > .toolbarbutton-text {
|
||||
display: block;
|
||||
padding-top: @metro_spacing_small@;
|
||||
font-size: 0.75rem;
|
||||
|
|
Загрузка…
Ссылка в новой задаче