зеркало из https://github.com/mozilla/gecko-dev.git
Bug 631298 - Status panel: use min-width for loading status messages only. r=gavin
This commit is contained in:
Родитель
4e4a9ffc81
Коммит
ea4e7f6f3b
|
@ -460,7 +460,6 @@ statuspanel {
|
|||
margin-top: -3em;
|
||||
left: 0;
|
||||
max-width: 50%;
|
||||
min-width: 25%;
|
||||
-moz-transition: opacity 100ms ease-out;
|
||||
}
|
||||
|
||||
|
@ -470,6 +469,10 @@ statuspanel:-moz-locale-dir(rtl):not([mirror]) {
|
|||
right: 0;
|
||||
}
|
||||
|
||||
statuspanel[type=status] {
|
||||
min-width: 25%;
|
||||
}
|
||||
|
||||
statuspanel[label=""] {
|
||||
-moz-transition: none;
|
||||
opacity: 0;
|
||||
|
|
|
@ -4157,16 +4157,22 @@ var XULBrowserWindow = {
|
|||
},
|
||||
|
||||
updateStatusField: function () {
|
||||
var text = this.overLink;
|
||||
if (!text && this._busyUI)
|
||||
text = this.status;
|
||||
if (!text)
|
||||
text = this.jsStatus || this.jsDefaultStatus || this.defaultStatus;
|
||||
var text, type, types = ["overLink"];
|
||||
if (this._busyUI)
|
||||
types.push("status");
|
||||
types.push("jsStatus", "jsDefaultStatus", "defaultStatus");
|
||||
for (let i = 0; !text && i < types.length; i++) {
|
||||
type = types[i];
|
||||
text = this[type];
|
||||
}
|
||||
|
||||
// check the current value so we don't trigger an attribute change
|
||||
// and cause needless (slow!) UI updates
|
||||
if (this.statusText != text) {
|
||||
this.statusTextField.label = text;
|
||||
let field = this.statusTextField;
|
||||
field.setAttribute("previoustype", field.getAttribute("type"));
|
||||
field.setAttribute("type", type);
|
||||
field.label = text;
|
||||
this.statusText = text;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3741,16 +3741,17 @@
|
|||
|
||||
<implementation>
|
||||
<property name="label">
|
||||
<setter>
|
||||
if (!this.label) {
|
||||
<setter><![CDATA[
|
||||
if (!this.label)
|
||||
this.removeAttribute("mirror");
|
||||
this.style.minWidth = "";
|
||||
} else {
|
||||
this.style.minWidth = getComputedStyle(this).width;
|
||||
}
|
||||
|
||||
this.style.minWidth = this.getAttribute("type") == "status" &&
|
||||
this.getAttribute("previoustype") == "status"
|
||||
? getComputedStyle(this).width : "";
|
||||
|
||||
this.setAttribute("label", val);
|
||||
return val;
|
||||
</setter>
|
||||
]]></setter>
|
||||
<getter>
|
||||
return this.getAttribute("label");
|
||||
</getter>
|
||||
|
|
Загрузка…
Ссылка в новой задаче