mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Bug 879977 - Restore Defaults button should be disabled, not hidden, when in the default state, r=mconley
This commit is contained in:
parent
9068f66933
commit
b6915b87b0
@ -696,8 +696,3 @@ chatbox:-moz-full-screen-ancestor > .chat-titlebar {
|
||||
*:-moz-full-screen-ancestor #social-sidebar-box:not(:-moz-full-screen-ancestor) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#customization-reset-button[hidden="true"] {
|
||||
display: -moz-box;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
@ -44,10 +44,6 @@ CustomizeMode.prototype = {
|
||||
_dragOverItem: null,
|
||||
_customizing: false,
|
||||
|
||||
get resetButton() {
|
||||
return this.document.getElementById("customization-reset-button");
|
||||
},
|
||||
|
||||
get panelUIContents() {
|
||||
return this.document.getElementById("PanelUI-contents");
|
||||
},
|
||||
@ -136,7 +132,7 @@ CustomizeMode.prototype = {
|
||||
this.visiblePalette.addEventListener("drop", this, true);
|
||||
this.visiblePalette.addEventListener("dragend", this, true);
|
||||
|
||||
this.resetButton.hidden = CustomizableUI.inDefaultState;
|
||||
this._updateResetButton();
|
||||
|
||||
let customizableToolbars = document.querySelectorAll("toolbar[customizable=true]:not([autohide=true]):not([collapsed=true])");
|
||||
for (let toolbar of customizableToolbars)
|
||||
@ -483,7 +479,7 @@ CustomizeMode.prototype = {
|
||||
document.persist(toolbar.id, "currentset");
|
||||
}
|
||||
|
||||
this.resetButton.hidden = CustomizableUI.inDefaultState;
|
||||
this._updateResetButton();
|
||||
this._showPanelCustomizationPlaceholders();
|
||||
},
|
||||
|
||||
@ -507,10 +503,15 @@ CustomizeMode.prototype = {
|
||||
|
||||
_onUIChange: function() {
|
||||
this._changed = true;
|
||||
this.resetButton.hidden = CustomizableUI.inDefaultState;
|
||||
this._updateResetButton();
|
||||
this.dispatchToolboxEvent("customizationchange");
|
||||
},
|
||||
|
||||
_updateResetButton: function() {
|
||||
let btn = this.document.getElementById("customization-reset-button");
|
||||
btn.disabled = CustomizableUI.inDefaultState;
|
||||
},
|
||||
|
||||
handleEvent: function(aEvent) {
|
||||
switch(aEvent.type) {
|
||||
case "contextmenu":
|
||||
|
@ -241,7 +241,7 @@ panelview toolbarbutton:not([disabled]):not([checked]):not([open]):not(:active):
|
||||
}
|
||||
|
||||
panelview toolbarbutton:not([disabled]):-moz-any([open],[checked],:hover:active),
|
||||
.customizationmode-button:hover:active,
|
||||
.customizationmode-button:not([disabled]):hover:active,
|
||||
#widget-overflow-list > toolbarbutton:not([disabled]):-moz-any([open],[checked],:hover:active) {
|
||||
background-image: -moz-linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1));
|
||||
background-color: hsla(210,54%,20%,.15);
|
||||
|
Loading…
Reference in New Issue
Block a user