Fix broken background

In commit c709076d9c the SVG got somehow
broken leading to black rectangles in all cases where it was used.

This commit reverts to the last working version, then reapplies the
"thick margin" from the change.

A test is supplied to show all our frameSVGs to hopefully make this
easier to spot if it happens again.

BUG: 430390
This commit is contained in:
David Edmundson 2020-12-17 12:41:38 +00:00
parent f09b46bec6
commit b1364fa601
2 changed files with 461 additions and 80 deletions

View File

@ -1,6 +1,25 @@
<svg id="svg2" version="1.1" viewBox="0 0 173 56.000004" xmlns="http://www.w3.org/2000/svg">
<defs id="defs4">
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="173"
height="56.000004"
viewBox="0 0 173 56.000004"
id="svg2"
version="1.1"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="panel-background.svg">
<defs
id="defs4">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#31363b;
stop-color:#31363b;
}
@ -43,82 +62,403 @@
.ColorScheme-ButtonFocus{
color:#3daee9;
stop-color:#3daee9;
}</style>
</defs>
<g id="layer1" transform="translate(0,-904.36218)">
<rect id="hint-tile-center" y="904.36218" width="5" height="5" fill="#f60"/>
<g id="center">
<rect id="rect4401" x="19.000004" y="916.36218" width="32" height="32" fill="none"/>
<rect id="rect4138" class="ColorScheme-Background" x="19.000004" y="916.36218" width="32" height="32" fill="currentColor"/>
</g>
<g id="topright" fill="currentColor">
<path id="rect4177" class="ColorScheme-Background" d="m51 910.36218v1 4 1h1 1 3 1v-1-4l-1-2e-5v-0.99998h-3-1z"/>
<path id="path4842" class="ColorScheme-Text" d="m51 910.36216v1h3 1 1v1 1 3h1v-3-1-1h-1v-1h-1-1z" fill-rule="evenodd" opacity=".3"/>
</g>
<g id="mask-top" transform="translate(116)">
<rect id="rect4265" transform="matrix(0,-1,-1,0,0,0)" x="-915.36218" y="-51" width="4.9999771" height="32.000015" opacity=".97000002"/>
</g>
<g id="mask-topleft" transform="translate(116)">
<path id="path4277" transform="translate(-116,904.36218)" d="m130 6v0.9999798l-1 2.02e-5v4h5v-5h-1z" opacity=".97000002"/>
</g>
<g id="mask-topright" transform="translate(116)">
<path id="path4287" transform="translate(-116,904.36218)" d="m168 6v5h5v-4l-1-2.02e-5v-0.9999798h-3z" opacity=".97000002"/>
</g>
<g id="mask-bottom" transform="translate(116)">
<rect id="rect4291" transform="rotate(90)" x="949.36218" y="-51" width="5.0000229" height="32.000015" opacity=".97000002"/>
</g>
<g id="mask-bottomleft" transform="translate(116)">
<path id="path4303" transform="translate(-116,904.36218)" d="m129 45v4l1-2e-5v1.00002h3 1v-5z" opacity=".97000002"/>
</g>
<g id="mask-bottomright" transform="translate(116)">
<path id="path4313" transform="translate(-116,904.36218)" d="m168 45v5h1 3v-1.00002l1 2e-5v-4z" opacity=".97000002"/>
</g>
<g id="mask-left" transform="translate(116)">
<rect id="rect4317" transform="scale(-1,1)" x="-18" y="916.36218" width="4.9999962" height="32.000023" opacity=".97000002"/>
</g>
<g id="mask-right" transform="translate(116)">
<rect id="rect4323" x="52" y="916.36218" width="4.9999847" height="32.000023" opacity=".97000002"/>
</g>
<g id="mask-center" transform="translate(116)">
<rect id="rect4329" x="19.000004" y="916.36218" width="32" height="32" fill="none"/>
<rect id="rect4331" x="19.000004" y="916.36218" width="32" height="32" opacity=".97000002"/>
</g>
<g id="right" fill="currentColor">
<rect id="rect4140" class="ColorScheme-Background" x="50.999985" y="916.36218" width="5.9999995" height="32"/>
<rect id="rect4902-0" class="ColorScheme-Text" x="56" y="916.36218" width="1.0000153" height="32" opacity=".3"/>
</g>
<g id="top" transform="matrix(0,-1,1,0,-897.36218,967.36214)" fill="currentColor">
<rect id="rect3146" class="ColorScheme-Background" x="50.999985" y="916.36218" width="5.9999995" height="32"/>
<rect id="rect3148" class="ColorScheme-Text" x="56" y="916.36218" width="1.0000153" height="32" opacity=".3"/>
</g>
<g id="bottom" transform="matrix(0,1,-1,0,967.36218,897.36216)" fill="currentColor">
<rect id="rect3152" class="ColorScheme-Background" x="50.999985" y="916.36218" width="5.9999995" height="32"/>
<rect id="rect3154" class="ColorScheme-Text" x="56" y="916.36218" width="1.0000153" height="32" opacity=".3"/>
</g>
<g id="left" transform="matrix(-1,0,0,-1,69.999985,1864.7243)" fill="currentColor">
<rect id="rect3164" class="ColorScheme-Background" x="50.999985" y="916.36218" width="5.9999995" height="32"/>
<rect id="rect3166" class="ColorScheme-Text" x="56" y="916.36218" width="1.0000153" height="32" opacity=".3"/>
</g>
<g id="bottomright" transform="matrix(0,1,-1,0,967.36216,897.36216)" fill="currentColor">
<path id="path3176" class="ColorScheme-Background" d="m51 910.36218v1 4 1h1 1 3 1v-1-4l-1-2e-5v-0.99998h-3-1z"/>
<path id="path3178" class="ColorScheme-Text" d="m51 910.36216v1h3 1 1v1 1 3h1v-3-1-1h-1v-1h-1-1z" fill-rule="evenodd" opacity=".3"/>
</g>
<g id="bottomleft" transform="matrix(-1,0,0,-1,70,1864.7243)" fill="currentColor">
<path id="path3182" class="ColorScheme-Background" d="m51 910.36218v1 4 1h1 1 3 1v-1-4l-1-2e-5v-0.99998h-3-1z"/>
<path id="path3184" class="ColorScheme-Text" d="m51 910.36216v1h3 1 1v1 1 3h1v-3-1-1h-1v-1h-1-1z" fill-rule="evenodd" opacity=".3"/>
</g>
<g id="topleft" transform="matrix(0,-1,1,0,-897.36216,967.36216)" fill="currentColor">
<path id="path3188" class="ColorScheme-Background" d="m51 910.36218v1 4 1h1 1 3 1v-1-4l-1-2e-5v-0.99998h-3-1z"/>
<path id="path3190" class="ColorScheme-Text" d="m51 910.36216v1h3 1 1v1 1 3h1v-3-1-1h-1v-1h-1-1z" fill-rule="evenodd" opacity=".3"/>
</g>
<rect id="thick-hint-top-margin" x="34" y="911.36218" width="4.0000019" height="8.0000048" fill="#f0f"/>
<rect id="thick-hint-bottom-margin" x="30" y="945.36218" width="4" height="8.0001907" fill="#f0f"/>
<rect id="thick-right-margin" transform="rotate(90)" x="932.36218" y="-55.999985" width="3.9999771" height="7.9999847" fill="#f0f"/>
<rect id="thick-hint-left-margin" transform="rotate(90)" x="928.36218" y="-22" width="4.0000229" height="8.0000076" fill="#f0f"/>
<rect id="hint-bottom-margin" x="34" y="949.36218" width="4" height="4.0002136" fill="#800080"/>
<rect id="hint-right-margin" transform="rotate(90)" x="928.36218" y="-55.999985" width="3.9999771" height="3.9999847" fill="#800080"/>
<rect id="hint-left-margin" transform="rotate(90)" x="932.36218" y="-18" width="4.0000229" height="4.0000076" fill="#800080"/>
<rect id="hint-top-margin" x="30" y="911.36218" width="4.0000019" height="3.9999795" fill="#800080"/>
<rect id="thick-center" x="-5.6843419e-14" y="960.36218" width="2" height="2"/>
}
</style>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#b0dba0"
bordercolor="#cc0000"
borderopacity="1"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="11.699422"
inkscape:cx="41.598735"
inkscape:cy="28.851737"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:showpageshadow="false"
borderlayer="true"
units="px"
inkscape:window-width="1343"
inkscape:window-height="908"
inkscape:window-x="1499"
inkscape:window-y="248"
inkscape:window-maximized="0"
showguides="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:document-rotation="0">
<inkscape:grid
type="xygrid"
id="grid3336"
empspacing="2"
originx="0"
originy="-91.999976" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-904.36218)">
<rect
style="opacity:1;fill:#ff6600;fill-opacity:1;stroke:none"
id="hint-tile-center"
width="5"
height="5"
x="0"
y="904.36218" />
<g
id="center">
<rect
y="916.36218"
x="19.000004"
height="32"
width="32"
id="rect4401"
style="opacity:1;fill:none;fill-opacity:1;stroke:none" />
<rect
style="opacity:1;fill:currentColor;fill-opacity:1;stroke:none"
id="rect4138"
width="32"
height="32"
x="19.000004"
y="916.36218"
class="ColorScheme-Background" />
</g>
<rect
style="fill:#ff00ff;fill-opacity:1;stroke:none"
id="hint-top-margin"
width="4"
height="2"
x="33"
y="920.36218" />
<rect
y="946.36218"
x="33"
height="2"
width="4"
id="hint-bottom-margin"
style="fill:#ff00ff;fill-opacity:1;stroke:none" />
<rect
y="-46.999985"
x="930.36218"
height="2"
width="4"
id="hint-right-margin"
style="fill:#ff00ff;fill-opacity:1;stroke:none"
transform="matrix(0,1,-1,0,0,0)" />
<rect
style="fill:#ff00ff;fill-opacity:1;stroke:none"
id="hint-left-margin"
width="4"
height="2"
x="930.36218"
y="-21"
transform="matrix(0,1,-1,0,0,0)" />
<g
id="topright">
<path
style="fill:currentColor;fill-opacity:1"
d="m 51,910.36218 0,1 0,4 0,1 1,0 1,0 3,0 1,0 0,-1 0,-4 -1,-2e-5 0,-0.99998 -3,0 -1,0 z"
id="rect4177"
inkscape:connector-curvature="0"
class="ColorScheme-Background"
sodipodi:nodetypes="ccccccccccccccc" />
<path
sodipodi:nodetypes="ccccccccccccccccc"
inkscape:connector-curvature="0"
id="path4842"
d="m 51,910.36216 0,1 3,0 1,0 1,0 0,1 0,1 0,3 1,0 0,-3 0,-1 0,-1 -1,0 0,-1 -1,0 -1,0 z"
style="opacity:0.3;fill:currentColor;fill-rule:evenodd;stroke:none"
class="ColorScheme-Text" />
</g>
<g
id="mask-top"
transform="translate(116,0)">
<rect
transform="matrix(0,-1,-1,0,0,0)"
style="opacity:0.97000002;fill:#000000;fill-opacity:1;stroke:none"
id="rect4265"
width="4.9999771"
height="32.000015"
x="-915.36218"
y="-51" />
</g>
<g
id="mask-topleft"
transform="translate(116,0)">
<path
style="opacity:0.97000002;fill:#000000;fill-opacity:1"
d="M 130,6 130,6.9999798 129,7 l 0,4 5,0 0,-5 -1,0 z"
transform="translate(-116,904.36218)"
id="path4277"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
<g
id="mask-topright"
transform="translate(116,0)">
<path
style="opacity:0.97000002;fill:#000000;fill-opacity:1"
d="m 168,6 0,5 5,0 0,-4 -1,-2.02e-5 L 172,6 169,6 z"
transform="translate(-116,904.36218)"
id="path4287"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
<g
id="mask-bottom"
transform="translate(116,0)">
<rect
y="-51"
x="949.36218"
height="32.000015"
width="5.0000229"
id="rect4291"
style="opacity:0.97000002;fill:#000000;fill-opacity:1;stroke:none"
transform="matrix(0,1,-1,0,0,0)" />
</g>
<g
id="mask-bottomleft"
transform="translate(116,0)">
<path
style="opacity:0.97000002;fill:#000000;fill-opacity:1"
d="m 129,45 0,4 1,-2e-5 0,1.00002 3,0 1,0 0,-5 z"
transform="translate(-116,904.36218)"
id="path4303"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
<g
id="mask-bottomright"
transform="translate(116,0)">
<path
style="opacity:0.97000002;fill:#000000;fill-opacity:1"
d="m 168,45 0,5 1,0 3,0 0,-1.00002 1,2e-5 0,-4 z"
transform="translate(-116,904.36218)"
id="path4313"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
<g
id="mask-left"
transform="translate(116,0)">
<rect
y="916.36218"
x="-18"
height="32.000023"
width="4.9999962"
id="rect4317"
style="opacity:0.97000002;fill:#000000;fill-opacity:1;stroke:none"
transform="scale(-1,1)" />
</g>
<g
id="mask-right"
transform="translate(116,0)">
<rect
style="opacity:0.97000002;fill:#000000;fill-opacity:1;stroke:none"
id="rect4323"
width="4.9999847"
height="32.000023"
x="52"
y="916.36218" />
</g>
<g
id="mask-center"
transform="translate(116,0)">
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:none"
id="rect4329"
width="32"
height="32"
x="19.000004"
y="916.36218" />
<rect
y="916.36218"
x="19.000004"
height="32"
width="32"
id="rect4331"
style="opacity:0.97000002;fill:#000000;fill-opacity:1;stroke:none" />
</g>
<g
id="right">
<rect
y="916.36218"
x="50.999985"
height="32"
width="5.9999995"
id="rect4140"
style="fill:currentColor;fill-opacity:1;stroke:none"
class="ColorScheme-Background" />
<rect
y="916.36218"
x="56"
height="32"
width="1.0000153"
id="rect4902-0"
style="opacity:0.3;fill:currentColor;stroke:none"
class="ColorScheme-Text" />
</g>
<g
id="top"
transform="matrix(0,-1,1,0,-897.36218,967.36214)">
<rect
class="ColorScheme-Background"
style="fill:currentColor;fill-opacity:1;stroke:none"
id="rect3146"
width="5.9999995"
height="32"
x="50.999985"
y="916.36218" />
<rect
style="opacity:0.3;fill:currentColor;stroke:none"
id="rect3148"
width="1.0000153"
height="32"
x="56"
y="916.36218"
class="ColorScheme-Text" />
</g>
<g
id="bottom"
transform="matrix(0,1,-1,0,967.36218,897.36216)">
<rect
class="ColorScheme-Background"
style="fill:currentColor;fill-opacity:1;stroke:none"
id="rect3152"
width="5.9999995"
height="32"
x="50.999985"
y="916.36218" />
<rect
style="opacity:0.3;fill:currentColor;stroke:none"
id="rect3154"
width="1.0000153"
height="32"
x="56"
y="916.36218"
class="ColorScheme-Text" />
</g>
<g
transform="matrix(-1,0,0,-1,69.999985,1864.7243)"
id="left">
<rect
y="916.36218"
x="50.999985"
height="32"
width="5.9999995"
id="rect3164"
style="fill:currentColor;fill-opacity:1;stroke:none"
class="ColorScheme-Background" />
<rect
y="916.36218"
x="56"
height="32"
width="1.0000153"
id="rect3166"
style="opacity:0.3;fill:currentColor;stroke:none"
class="ColorScheme-Text" />
</g>
<g
id="bottomright"
transform="matrix(0,1,-1,0,967.36216,897.36216)">
<path
sodipodi:nodetypes="ccccccccccccccc"
class="ColorScheme-Background"
inkscape:connector-curvature="0"
id="path3176"
d="m 51,910.36218 0,1 0,4 0,1 1,0 1,0 3,0 1,0 0,-1 0,-4 -1,-2e-5 0,-0.99998 -3,0 -1,0 z"
style="fill:currentColor;fill-opacity:1" />
<path
style="opacity:0.3;fill:currentColor;fill-rule:evenodd;stroke:none"
d="m 51,910.36216 0,1 3,0 1,0 1,0 0,1 0,1 0,3 1,0 0,-3 0,-1 0,-1 -1,0 0,-1 -1,0 -1,0 z"
id="path3178"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccc"
class="ColorScheme-Text" />
</g>
<g
transform="matrix(-1,0,0,-1,70,1864.7243)"
id="bottomleft">
<path
style="fill:currentColor;fill-opacity:1"
d="m 51,910.36218 0,1 0,4 0,1 1,0 1,0 3,0 1,0 0,-1 0,-4 -1,-2e-5 0,-0.99998 -3,0 -1,0 z"
id="path3182"
inkscape:connector-curvature="0"
class="ColorScheme-Background"
sodipodi:nodetypes="ccccccccccccccc" />
<path
sodipodi:nodetypes="ccccccccccccccccc"
inkscape:connector-curvature="0"
id="path3184"
d="m 51,910.36216 0,1 3,0 1,0 1,0 0,1 0,1 0,3 1,0 0,-3 0,-1 0,-1 -1,0 0,-1 -1,0 -1,0 z"
style="opacity:0.3;fill:currentColor;fill-rule:evenodd;stroke:none"
class="ColorScheme-Text" />
</g>
<g
id="topleft"
transform="matrix(0,-1,1,0,-897.36216,967.36216)">
<path
sodipodi:nodetypes="ccccccccccccccc"
class="ColorScheme-Background"
inkscape:connector-curvature="0"
id="path3188"
d="m 51,910.36218 0,1 0,4 0,1 1,0 1,0 3,0 1,0 0,-1 0,-4 -1,-2e-5 0,-0.99998 -3,0 -1,0 z"
style="fill:currentColor;fill-opacity:1" />
<path
style="opacity:0.3;fill:currentColor;fill-rule:evenodd;stroke:none"
d="m 51,910.36216 0,1 3,0 1,0 1,0 0,1 0,1 0,3 1,0 0,-3 0,-1 0,-1 -1,0 0,-1 -1,0 -1,0 z"
id="path3190"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccc"
class="ColorScheme-Text" />
</g>
<rect
id="thick-hint-top-margin"
x="34"
y="911.36218"
width="4.0000019"
height="8.0000048"
fill="#ff00ff" />
<rect
id="thick-hint-bottom-margin"
x="29.999998"
y="945.36218"
width="4"
height="8.0001907"
fill="#ff00ff" />
<rect
id="thick-right-margin"
transform="rotate(90)"
x="932.36218"
y="-55.999977"
width="3.9999771"
height="7.9999847"
fill="#ff00ff" />
<rect
id="thick-hint-left-margin"
transform="rotate(90)"
x="928.36218"
y="-21.999989"
width="4.0000229"
height="8.0000076"
fill="#ff00ff" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 13 KiB

41
tests/frames.qml Normal file
View File

@ -0,0 +1,41 @@
/*
SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.0
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
Item
{
width: 500
height: 500
Grid {
anchors.fill: parent
columns: 3
Repeater {
model: ["widgets/background",
"widgets/panel-background",
"opaque/widgets/panel-background",
"widgets/tooltip",
"opaque/widgets/tooltip"
]
delegate: PlasmaCore.FrameSvgItem {
width: 100
height: 100
imagePath: modelData
}
}
}
}