зеркало из https://github.com/mozilla/pjs.git
Bug 683873 - [highlighter] move the close button to the toolbar; r=dao
This commit is contained in:
Родитель
a37af32a60
Коммит
85fb43dae3
|
@ -987,6 +987,11 @@
|
|||
dir="top" disabled="true"
|
||||
element="inspector-tree-box"/>
|
||||
<hbox>
|
||||
#ifdef XP_MACOSX
|
||||
<toolbarbutton id="highlighter-closebutton"
|
||||
oncommand="InspectorUI.closeInspectorUI(false);"
|
||||
tooltiptext="&inspectCloseButton.tooltiptext;"/>
|
||||
#endif
|
||||
<toolbarbutton id="inspector-inspect-toolbutton"
|
||||
label="&inspectButton.label;"
|
||||
accesskey="&inspectButton.accesskey;"
|
||||
|
@ -997,6 +1002,11 @@
|
|||
<hbox id="inspector-tools">
|
||||
<!-- registered tools go here -->
|
||||
</hbox>
|
||||
#ifndef XP_MACOSX
|
||||
<toolbarbutton id="highlighter-closebutton"
|
||||
oncommand="InspectorUI.closeInspectorUI(false);"
|
||||
tooltiptext="&inspectCloseButton.tooltiptext;"/>
|
||||
#endif
|
||||
<resizer id="inspector-end-resizer"
|
||||
class="inspector-resizer"
|
||||
dir="top" disabled="true"
|
||||
|
|
|
@ -30,16 +30,19 @@
|
|||
-moz-box-direction: reverse;
|
||||
}
|
||||
|
||||
#highlighter-close-button {
|
||||
position: absolute;
|
||||
pointer-events: auto;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.inspector-breadcrumbs-button {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.inspector-resizer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#inspector-toolbar[treepanel-open] > vbox > #inspector-top-resizer,
|
||||
#inspector-toolbar[treepanel-open] > vbox > hbox > #inspector-end-resizer {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
/*
|
||||
* Node Infobar
|
||||
*/
|
||||
|
|
|
@ -231,12 +231,7 @@ TreePanel.prototype = {
|
|||
treeBox.flex = 1;
|
||||
toolbarParent.insertBefore(treeBox, toolbar);
|
||||
|
||||
let resizerTop =
|
||||
this.IUI.browser.ownerDocument.getElementById("inspector-top-resizer");
|
||||
let resizerEnd =
|
||||
this.IUI.browser.ownerDocument.getElementById("inspector-end-resizer");
|
||||
resizerTop.removeAttribute("disabled");
|
||||
resizerEnd.removeAttribute("disabled");
|
||||
this.IUI.toolbar.setAttribute("treepanel-open", "true");
|
||||
|
||||
treeBox.appendChild(this.treeIFrame);
|
||||
|
||||
|
@ -264,12 +259,7 @@ TreePanel.prototype = {
|
|||
close: function TP_close()
|
||||
{
|
||||
if (this.openInDock) {
|
||||
let resizerTop =
|
||||
this.IUI.browser.ownerDocument.getElementById("inspector-top-resizer");
|
||||
let resizerEnd =
|
||||
this.IUI.browser.ownerDocument.getElementById("inspector-end-resizer");
|
||||
resizerTop.setAttribute("disabled", "true");
|
||||
resizerEnd.setAttribute("disabled", "true");
|
||||
this.IUI.toolbar.removeAttribute("treepanel-open");
|
||||
|
||||
let treeBox = this.container;
|
||||
let treeBoxParent = treeBox.parentNode;
|
||||
|
|
|
@ -124,6 +124,8 @@ Highlighter.prototype = {
|
|||
this.veilContainer = this.chromeDoc.createElement("vbox");
|
||||
this.veilContainer.id = "highlighter-veil-container";
|
||||
|
||||
// The controlsBox will host the different interactive
|
||||
// elements of the highlighter (buttons, toolbars, ...).
|
||||
let controlsBox = this.chromeDoc.createElement("box");
|
||||
controlsBox.id = "highlighter-controls";
|
||||
this.highlighterContainer.appendChild(this.veilContainer);
|
||||
|
@ -135,9 +137,7 @@ Highlighter.prototype = {
|
|||
// for the region of the selected box.
|
||||
this.buildVeil(this.veilContainer);
|
||||
|
||||
// The controlsBox will host the different interactive
|
||||
// elements of the highlighter (buttons, toolbars, ...).
|
||||
this.buildControls(controlsBox);
|
||||
this.buildInfobar(controlsBox);
|
||||
|
||||
this.browser.addEventListener("resize", this, true);
|
||||
this.browser.addEventListener("scroll", this, true);
|
||||
|
@ -200,20 +200,6 @@ Highlighter.prototype = {
|
|||
aParent.appendChild(veilBottomBox);
|
||||
},
|
||||
|
||||
/**
|
||||
* Build the controls:
|
||||
*
|
||||
* <box id="highlighter-close-button"/>
|
||||
*
|
||||
* @param nsIDOMElement aParent
|
||||
* The container of the controls elements.
|
||||
*/
|
||||
buildControls: function Highlighter_buildControls(aParent)
|
||||
{
|
||||
this.buildCloseButton(aParent);
|
||||
this.buildInfobar(aParent);
|
||||
},
|
||||
|
||||
/**
|
||||
* Build the node Infobar.
|
||||
*
|
||||
|
@ -279,28 +265,6 @@ Highlighter.prototype = {
|
|||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Build the close button.
|
||||
*
|
||||
* @param nsIDOMElement aParent
|
||||
* The container of the close-button.
|
||||
*/
|
||||
buildCloseButton: function Highlighter_buildCloseButton(aParent)
|
||||
{
|
||||
let closeButton = this.chromeDoc.createElement("box");
|
||||
closeButton.id = "highlighter-close-button";
|
||||
closeButton.appendChild(this.chromeDoc.createElement("image"));
|
||||
|
||||
let boundCloseEventHandler = this.IUI.closeInspectorUI.bind(this.IUI, false);
|
||||
|
||||
closeButton.addEventListener("click", boundCloseEventHandler, false);
|
||||
|
||||
aParent.appendChild(closeButton);
|
||||
|
||||
this.boundCloseEventHandler = boundCloseEventHandler;
|
||||
this.closeButton = closeButton;
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy the nodes.
|
||||
*/
|
||||
|
@ -308,10 +272,7 @@ Highlighter.prototype = {
|
|||
{
|
||||
this.browser.removeEventListener("scroll", this, true);
|
||||
this.browser.removeEventListener("resize", this, true);
|
||||
this.closeButton.removeEventListener("click", this.boundCloseEventHandler, false);
|
||||
this.boundCloseEventHandler = null;
|
||||
this.closeButton.parentNode.removeChild(this.closeButton);
|
||||
this.closeButton = null;
|
||||
this._contentRect = null;
|
||||
this._highlightRect = null;
|
||||
this._highlighting = false;
|
||||
|
|
|
@ -213,9 +213,10 @@ can reach it easily. -->
|
|||
<!ENTITY scratchpad.keycode "VK_F4">
|
||||
<!ENTITY scratchpad.keytext "F4">
|
||||
|
||||
<!ENTITY inspectPanelTitle.label "HTML">
|
||||
<!ENTITY inspectButton.label "Inspect">
|
||||
<!ENTITY inspectButton.accesskey "I">
|
||||
<!ENTITY inspectPanelTitle.label "HTML">
|
||||
<!ENTITY inspectButton.label "Inspect">
|
||||
<!ENTITY inspectButton.accesskey "I">
|
||||
<!ENTITY inspectCloseButton.tooltiptext "Close Inspector">
|
||||
|
||||
<!ENTITY getMoreDevtoolsCmd.label "Get More Tools">
|
||||
<!ENTITY getMoreDevtoolsCmd.accesskey "M">
|
||||
|
|
|
@ -1927,16 +1927,16 @@ panel[dimmed="true"] {
|
|||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-close-button {
|
||||
list-style-image: url("chrome://browser/skin/KUI-close.png");
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
#highlighter-closebutton {
|
||||
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#highlighter-close-button:-moz-locale-dir(rtl) {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
#highlighter-closebutton > .toolbarbutton-icon {
|
||||
/* XXX Buttons have padding in widget/ that we don't want here but can't override with good CSS, so we must
|
||||
use evil CSS to give the impression of smaller content */
|
||||
margin: -4px;
|
||||
}
|
||||
|
||||
#highlighter-veil-transparentbox {
|
||||
|
@ -1954,12 +1954,17 @@ panel[dimmed="true"] {
|
|||
|
||||
#inspector-toolbar {
|
||||
-moz-appearance: none;
|
||||
padding: 0 3px 4px;
|
||||
padding: 4px 3px;
|
||||
border-top: 1px solid hsla(210, 8%, 5%, .65);
|
||||
box-shadow: 0 1px 0 0 hsla(210, 16%, 76%, .2) inset;
|
||||
background-image: -moz-linear-gradient(top, hsl(210,11%,36%), hsl(210,11%,18%));
|
||||
}
|
||||
|
||||
#inspector-toolbar[treepanel-open] {
|
||||
padding-top: 0;
|
||||
-moz-padding-end: 0;
|
||||
}
|
||||
|
||||
#inspector-inspect-toolbutton,
|
||||
#inspector-tools > toolbarbutton {
|
||||
-moz-appearance: none;
|
||||
|
@ -2005,10 +2010,6 @@ panel[dimmed="true"] {
|
|||
cursor: n-resize;
|
||||
}
|
||||
|
||||
.inspector-resizer[disabled] {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#inspector-top-resizer {
|
||||
background: none;
|
||||
height: 4px;
|
||||
|
|
|
@ -2522,16 +2522,24 @@ panel[dimmed="true"] {
|
|||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-close-button {
|
||||
list-style-image: url("chrome://browser/skin/KUI-close.png");
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
#highlighter-closebutton {
|
||||
list-style-image: url("chrome://browser/skin/devtools/toolbarbutton-close.png");
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
min-width: 16px;
|
||||
width: 16px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
#highlighter-close-button:-moz-locale-dir(rtl) {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
#highlighter-closebutton > .toolbarbutton-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#highlighter-closebutton:hover {
|
||||
-moz-image-region: rect(0, 32px, 16px, 16px);
|
||||
}
|
||||
|
||||
#highlighter-closebutton:active {
|
||||
-moz-image-region: rect(0, 48px, 16px, 32px);
|
||||
}
|
||||
|
||||
#highlighter-veil-transparentbox {
|
||||
|
@ -2549,10 +2557,14 @@ panel[dimmed="true"] {
|
|||
|
||||
#inspector-toolbar {
|
||||
-moz-appearance: none;
|
||||
padding: 0 3px 4px;
|
||||
border-top: 1px solid hsla(210, 8%, 5%, .65);
|
||||
box-shadow: 0 1px 0 0 hsla(210, 16%, 76%, .2) inset;
|
||||
background-image: -moz-linear-gradient(top, hsl(210,11%,36%), hsl(210,11%,18%));
|
||||
padding: 4px 16px 4px 0; /* use -moz-padding-end: 16px when/if bug 631729 gets fixed */
|
||||
}
|
||||
|
||||
#inspector-toolbar[treepanel-open] {
|
||||
padding: 0 0 4px;
|
||||
}
|
||||
|
||||
#inspector-inspect-toolbutton,
|
||||
|
@ -2600,10 +2612,6 @@ panel[dimmed="true"] {
|
|||
cursor: n-resize;
|
||||
}
|
||||
|
||||
.inspector-resizer[disabled] {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#inspector-top-resizer {
|
||||
background: none;
|
||||
height: 4px;
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.0 KiB |
|
@ -126,6 +126,7 @@ browser.jar:
|
|||
skin/classic/browser/devtools/search.png (devtools/search.png)
|
||||
skin/classic/browser/devtools/csshtmltree.css (devtools/csshtmltree.css)
|
||||
skin/classic/browser/devtools/gcli.css (devtools/gcli.css)
|
||||
skin/classic/browser/devtools/toolbarbutton-close.png (devtools/toolbarbutton-close.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-pressed.png (devtools/breadcrumbs/ltr-end-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected-pressed.png (devtools/breadcrumbs/ltr-end-selected-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected.png (devtools/breadcrumbs/ltr-end-selected.png)
|
||||
|
|
|
@ -2620,16 +2620,19 @@ panel[dimmed="true"] {
|
|||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#highlighter-close-button {
|
||||
list-style-image: url("chrome://browser/skin/KUI-close.png");
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
#highlighter-closebutton {
|
||||
list-style-image: url("chrome://browser/skin/devtools/toolbarbutton-close.png");
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
min-width: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
#highlighter-close-button:-moz-locale-dir(rtl) {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
#highlighter-closebutton:hover {
|
||||
-moz-image-region: rect(0, 32px, 16px, 16px);
|
||||
}
|
||||
|
||||
#highlighter-closebutton:active {
|
||||
-moz-image-region: rect(0, 48px, 16px, 32px);
|
||||
}
|
||||
|
||||
#highlighter-veil-transparentbox {
|
||||
|
@ -2647,12 +2650,17 @@ panel[dimmed="true"] {
|
|||
|
||||
#inspector-toolbar {
|
||||
-moz-appearance: none;
|
||||
padding: 0 3px 4px;
|
||||
padding: 4px 3px;
|
||||
border-top: 1px solid hsla(211,68%,6%,.65) !important;
|
||||
box-shadow: 0 1px 0 hsla(209,29%,72%,.25) inset;
|
||||
background-image: -moz-linear-gradient(top, hsl(209,18%,34%), hsl(210,24%,16%));
|
||||
}
|
||||
|
||||
#inspector-toolbar[treepanel-open] {
|
||||
padding-top: 0;
|
||||
-moz-padding-end: 0;
|
||||
}
|
||||
|
||||
#inspector-inspect-toolbutton,
|
||||
#inspector-tools > toolbarbutton {
|
||||
-moz-appearance: none;
|
||||
|
@ -2698,10 +2706,6 @@ panel[dimmed="true"] {
|
|||
cursor: n-resize;
|
||||
}
|
||||
|
||||
.inspector-resizer[disabled] {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#inspector-top-resizer {
|
||||
background: none;
|
||||
height: 4px;
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 898 B |
|
@ -110,6 +110,7 @@ browser.jar:
|
|||
skin/classic/browser/devtools/search.png (devtools/search.png)
|
||||
skin/classic/browser/devtools/csshtmltree.css (devtools/csshtmltree.css)
|
||||
skin/classic/browser/devtools/gcli.css (devtools/gcli.css)
|
||||
skin/classic/browser/devtools/toolbarbutton-close.png (devtools/toolbarbutton-close.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-pressed.png (devtools/breadcrumbs/ltr-end-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected-pressed.png (devtools/breadcrumbs/ltr-end-selected-pressed.png)
|
||||
skin/classic/browser/devtools/breadcrumbs/ltr-end-selected.png (devtools/breadcrumbs/ltr-end-selected.png)
|
||||
|
@ -261,6 +262,7 @@ browser.jar:
|
|||
skin/classic/aero/browser/devtools/search.png (devtools/search.png)
|
||||
skin/classic/aero/browser/devtools/csshtmltree.css (devtools/csshtmltree.css)
|
||||
skin/classic/aero/browser/devtools/gcli.css (devtools/gcli.css)
|
||||
skin/classic/aero/browser/devtools/toolbarbutton-close.png (devtools/toolbarbutton-close.png)
|
||||
skin/classic/aero/browser/devtools/breadcrumbs/ltr-end-pressed.png (devtools/breadcrumbs/ltr-end-pressed.png)
|
||||
skin/classic/aero/browser/devtools/breadcrumbs/ltr-end-selected-pressed.png (devtools/breadcrumbs/ltr-end-selected-pressed.png)
|
||||
skin/classic/aero/browser/devtools/breadcrumbs/ltr-end-selected.png (devtools/breadcrumbs/ltr-end-selected.png)
|
||||
|
|
Загрузка…
Ссылка в новой задаче