Bug 1288358 - restore padding around spectrum widget in colorpicker tooltip;r=pbro
MozReview-Commit-ID: BFZA3tDkoR0
--- a/devtools/client/shared/widgets/Tooltip.js
+++ b/devtools/client/shared/widgets/Tooltip.js
@@ -774,17 +774,17 @@ Heritage.extend(SwatchBasedEditorTooltip
let spectrumNode = doc.createElementNS(XHTML_NS, "div");
spectrumNode.id = "spectrum";
container.appendChild(spectrumNode);
let eyedropper = doc.createElementNS(XHTML_NS, "button");
eyedropper.id = "eyedropper-button";
eyedropper.className = "devtools-button";
container.appendChild(eyedropper);
- this.tooltip.setContent(container, { width: 210, height: 216 });
+ this.tooltip.setContent(container, { width: 218, height: 224 });
let spectrum = new Spectrum(spectrumNode, color);
// Wait for the tooltip to be shown before calling spectrum.show
// as it expect to be visible in order to compute DOM element sizes.
this.tooltip.once("shown", () => {
spectrum.show();
});
--- a/devtools/client/shared/widgets/cubic-bezier.css
+++ b/devtools/client/shared/widgets/cubic-bezier.css
@@ -2,21 +2,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Based on Lea Verou www.cubic-bezier.com
See https://github.com/LeaVerou/cubic-bezier */
.cubic-bezier-container {
display: flex;
- width: 500px;
+ width: 510px;
height: 370px;
flex-direction: row-reverse;
overflow: hidden;
padding: 5px;
+ box-sizing: border-box;
}
.display-wrap {
width: 50%;
height: 100%;
text-align: center;
overflow: hidden;
}
--- a/devtools/client/shared/widgets/filter-widget.css
+++ b/devtools/client/shared/widgets/filter-widget.css
@@ -1,19 +1,21 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Main container: Displays the filters and presets in 2 columns */
#filter-container {
- height: 100%;
+ width: 510px;
+ height: 200px;
display: flex;
position: relative;
padding: 5px;
+ box-sizing: border-box;
/* when opened in a xul:panel, a gray color is applied to text */
color: var(--theme-body-color);
}
#filter-container.dragging {
-moz-user-select: none;
}
--- a/devtools/client/shared/widgets/spectrum.css
+++ b/devtools/client/shared/widgets/spectrum.css
@@ -31,16 +31,20 @@
.spectrum-box {
border: 1px solid rgba(0,0,0,0.2);
border-radius: 2px;
background-clip: content-box;
}
/* Elements */
+#spectrum-tooltip {
+ padding: 4px;
+}
+
.spectrum-container {
position: relative;
display: none;
top: 0;
left: 0;
border-radius: 0;
width: 200px;
padding: 5px;