Bug 968891 - [Australis] Disable the button-text fade-out mask during the customization transition. r=Gijs

This commit is contained in:
Jared Wein 2014-02-07 13:17:58 -05:00
parent 4cc6ec2850
commit 31b4edbb25
2 changed files with 19 additions and 1 deletions

View File

@ -189,6 +189,11 @@ CustomizeMode.prototype = {
// Hide the palette before starting the transition for increased perf. // Hide the palette before starting the transition for increased perf.
this.visiblePalette.hidden = true; this.visiblePalette.hidden = true;
// Disable the button-text fade-out mask
// during the transition for increased perf.
let panelContents = window.PanelUI.contents;
panelContents.setAttribute("customize-transitioning", "true");
// Move the mainView in the panel to the holder so that we can see it // Move the mainView in the panel to the holder so that we can see it
// while customizing. // while customizing.
let mainView = window.PanelUI.mainView; let mainView = window.PanelUI.mainView;
@ -253,6 +258,8 @@ CustomizeMode.prototype = {
this._updateEmptyPaletteNotice(); this._updateEmptyPaletteNotice();
this._handler.isEnteringCustomizeMode = false; this._handler.isEnteringCustomizeMode = false;
panelContents.removeAttribute("customize-transitioning");
this.dispatchToolboxEvent("customizationready"); this.dispatchToolboxEvent("customizationready");
if (!this._wantToBeInCustomizeMode) { if (!this._wantToBeInCustomizeMode) {
this.exit(); this.exit();
@ -300,6 +307,11 @@ CustomizeMode.prototype = {
this.visiblePalette.hidden = true; this.visiblePalette.hidden = true;
this.paletteEmptyNotice.hidden = true; this.paletteEmptyNotice.hidden = true;
// Disable the button-text fade-out mask
// during the transition for increased perf.
let panelContents = window.PanelUI.contents;
panelContents.setAttribute("customize-transitioning", "true");
this._transitioning = true; this._transitioning = true;
Task.spawn(function() { Task.spawn(function() {
@ -353,6 +365,8 @@ CustomizeMode.prototype = {
document.getElementById("PanelUI-help").removeAttribute("disabled"); document.getElementById("PanelUI-help").removeAttribute("disabled");
document.getElementById("PanelUI-quit").removeAttribute("disabled"); document.getElementById("PanelUI-quit").removeAttribute("disabled");
panelContents.removeAttribute("customize-transitioning");
// We need to set this._customizing to false before removing the tab // We need to set this._customizing to false before removing the tab
// or the TabSelect event handler will think that we are exiting // or the TabSelect event handler will think that we are exiting
// customization mode for a second time. // customization mode for a second time.

View File

@ -116,10 +116,14 @@
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-multiline-text { .panelUI-grid .toolbarbutton-1 > .toolbarbutton-multiline-text {
text-align: center; text-align: center;
-moz-hyphens: auto; -moz-hyphens: auto;
mask: url(chrome://browser/content/browser.xul#menuPanelButtonTextFadeOutMask);
min-height: 3.5em; min-height: 3.5em;
} }
.panelUI-grid:not([customize-transitioning]) .toolbarbutton-menubutton-button > .toolbarbutton-multiline-text,
.panelUI-grid:not([customize-transitioning]) .toolbarbutton-1 > .toolbarbutton-multiline-text {
mask: url(chrome://browser/content/browser.xul#menuPanelButtonTextFadeOutMask);
}
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-multiline-text { .panelUI-grid .toolbarbutton-1 > .toolbarbutton-multiline-text {
margin: 2px 0 0; margin: 2px 0 0;
} }