Bug 733292 - The sidebar should have a close button. r=paul r=dao

This commit is contained in:
Aishwarya 2012-09-19 16:43:26 +02:00
parent 70363690e8
commit eb9c0387c6
3 changed files with 9 additions and 2 deletions

View File

@ -1067,7 +1067,12 @@
style="min-width: 18em; width: 22em; max-width: 42em;" persist="width">
<toolbar id="devtools-sidebar-toolbar"
class="devtools-toolbar"
nowindowdrag="true"/>
nowindowdrag="true">
<spacer flex="1"/>
<toolbarbutton tooltiptext="&inspectSidebarCloseButton.tooltiptext;"
class="devtools-closebutton"
command="Inspector:Sidebar"/>
</toolbar>
<deck id="devtools-sidebar-deck" flex="1"/>
</vbox>
<splitter id="social-sidebar-splitter"

View File

@ -1647,8 +1647,9 @@ InspectorStyleSidebar.prototype = {
btn.setAttribute("image", aRegObj.icon || "");
btn.setAttribute("type", "radio");
btn.setAttribute("group", "sidebar-tools");
this._toolbar.appendChild(btn);
let spacer = this._toolbar.querySelector("spacer");
this._toolbar.insertBefore(btn, spacer);
// create tool iframe
let frame = this._chromeDoc.createElement("iframe");
frame.setAttribute("flex", "1");

View File

@ -235,6 +235,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY scratchpad.keytext "F4">
<!ENTITY inspectCloseButton.tooltiptext "Close Inspector">
<!ENTITY inspectSidebarCloseButton.tooltiptext "Close sidebar">
<!ENTITY devToolbarCloseButton.tooltiptext "Close Developer Toolbar">
<!ENTITY devToolbarMenu.label "Developer Toolbar">