зеркало из https://github.com/mozilla/pjs.git
Bug 631270: move status panel to the opposite side of the screen when the findbar is open, to avoid it obscuring find results in the common case of them being at the bottom left of the screen, r=gavin, ui-r=beltzner, a=beltzner
This commit is contained in:
Родитель
4aef1c69f9
Коммит
454fe08769
|
@ -3750,11 +3750,23 @@
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
</content>
|
</content>
|
||||||
|
|
||||||
<implementation>
|
<implementation implements="nsIDOMEventListener">
|
||||||
|
<constructor><![CDATA[
|
||||||
|
window.addEventListener("findbaropen", this, false);
|
||||||
|
]]></constructor>
|
||||||
|
|
||||||
|
<destructor><![CDATA[
|
||||||
|
window.removeEventListener("findbaropen", this, false);
|
||||||
|
]]></destructor>
|
||||||
|
|
||||||
<property name="label">
|
<property name="label">
|
||||||
<setter><![CDATA[
|
<setter><![CDATA[
|
||||||
if (!this.label)
|
if (!this.label) {
|
||||||
this.removeAttribute("mirror");
|
if (window.gFindBarInitialized && !window.gFindBar.hidden)
|
||||||
|
this.setAttribute("mirror", "true");
|
||||||
|
else
|
||||||
|
this.removeAttribute("mirror");
|
||||||
|
}
|
||||||
|
|
||||||
this.style.minWidth = this.getAttribute("type") == "status" &&
|
this.style.minWidth = this.getAttribute("type") == "status" &&
|
||||||
this.getAttribute("previoustype") == "status"
|
this.getAttribute("previoustype") == "status"
|
||||||
|
@ -3768,6 +3780,15 @@
|
||||||
</getter>
|
</getter>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<method name="handleEvent">
|
||||||
|
<parameter name="event"/>
|
||||||
|
<body><![CDATA[
|
||||||
|
if (event.type == "findbaropen" &&
|
||||||
|
this.label)
|
||||||
|
this.setAttribute("mirror", "true");
|
||||||
|
]]></body>
|
||||||
|
</method>
|
||||||
|
|
||||||
<method name="_mirror">
|
<method name="_mirror">
|
||||||
<body>
|
<body>
|
||||||
if (this.hasAttribute("mirror"))
|
if (this.hasAttribute("mirror"))
|
||||||
|
|
|
@ -1142,6 +1142,11 @@
|
||||||
this.hidden = false;
|
this.hidden = false;
|
||||||
|
|
||||||
this._updateStatusUI(this.nsITypeAheadFind.FIND_FOUND);
|
this._updateStatusUI(this.nsITypeAheadFind.FIND_FOUND);
|
||||||
|
|
||||||
|
let event = document.createEvent("Events");
|
||||||
|
event.initEvent("findbaropen", true, false);
|
||||||
|
this.dispatchEvent(event);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче