Bug 856814 - [toolbox] Labels aren't centered in toolbox tabs; r=mratcliffe

This commit is contained in:
Heather Arthur 2013-05-10 18:53:58 -07:00
parent ba1a876b65
commit 91d981349e
4 changed files with 20 additions and 6 deletions

View File

@ -361,6 +361,11 @@ Toolbox.prototype = {
this.selectTool(id);
}.bind(this, id));
// spacer lets us center the image and label, while allowing cropping
let spacer = this.doc.createElement("spacer");
spacer.setAttribute("flex", "1");
radio.appendChild(spacer);
if (toolDefinition.icon) {
let image = this.doc.createElement("image");
image.setAttribute("src", toolDefinition.icon);

View File

@ -161,17 +161,20 @@
background-repeat: no-repeat;
background-position: left, right;
border-right: 1px solid hsla(206,37%,4%,.45);
-moz-box-align: center;
}
.devtools-tab > image {
border: none;
-moz-margin-end: 0;
-moz-margin-start: 8px;
-moz-margin-start: 4px;
opacity: 0.6;
max-height: 16px;
}
#toolbox-tab-options > image {
margin: 0 8px;
}
.devtools-tab > label {
white-space: nowrap;
}

View File

@ -150,15 +150,18 @@
background-repeat: no-repeat;
background-position: left, right;
border-right: 1px solid hsla(206,37%,4%,.45);
-moz-box-align: center;
}
.devtools-tab > image {
-moz-margin-end: 0;
-moz-margin-start: 8px;
-moz-margin-start: 4px;
opacity: 0.6;
}
#toolbox-tab-options > image {
margin: 0 8px;
}
.devtools-tab > label {
white-space: nowrap;
}

View File

@ -163,15 +163,18 @@
background-position: left, right;
border-top: 1px solid #060a0d;
border-right: 1px solid hsla(206,37%,4%,.45);
-moz-box-align: center;
}
.devtools-tab > image {
-moz-margin-end: 0;
-moz-margin-start: 8px;
-moz-margin-start: 4px;
opacity: 0.6;
}
#toolbox-tab-options > image {
margin: 0 8px;
}
.devtools-tab:hover > image {
opacity: 0.8;
}