Use GTK Composite Templates (close #62)

Use GTK Composite Templates for GUI elements to clean up and simplify
the code for widgets and all UI elements. This includes splitting the
large “gtk.glade” file into smaller .ui files and the large “widgets.py”
file into smaller .py files.
This commit is contained in:
coderkun 2020-08-02 17:18:28 +02:00
commit ba373ddf4e
31 changed files with 4431 additions and 4300 deletions

View file

@ -1,213 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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="1024"
height="1024"
viewBox="0 0 270.93333 270.93334"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r"
sodipodi:docname="mcg.svg">
<title
id="title4619">CoverGrid (mcg)</title>
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow"
id="filter4516">
<feFlood
flood-opacity="0.498039"
flood-color="rgb(255,255,255)"
result="flood"
id="feFlood4506" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite4508" />
<feGaussianBlur
in="composite1"
stdDeviation="7"
result="blur"
id="feGaussianBlur4510" />
<feOffset
dx="6"
dy="6"
result="offset"
id="feOffset4512" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite4514" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="107.73101"
inkscape:cy="490.36801"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1920"
inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
units="px"
inkscape:pagecheckerboard="true"
showborder="true"
inkscape:showpageshadow="false"
inkscape:snap-grids="true"
inkscape:snap-to-guides="true">
<sodipodi:guide
position="319.76785,-21.166667"
orientation="0,1"
id="guide4676"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
<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>CoverGrid (mcg)</dc:title>
<dc:date>2017</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>coderkun</dc:title>
</cc:Agent>
</dc:creator>
<dc:description>https://www.suruatoel.xyz/codes/mcg</dc:description>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-nc-nd/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-nc-nd/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:prohibits
rdf:resource="http://creativecommons.org/ns#CommercialUse" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-26.06665)">
<g
id="g4504"
transform="matrix(0.8231966,0,0,0.8231966,23.950969,28.559636)">
<rect
y="117.61248"
x="91.54583"
height="87.841667"
width="87.841667"
id="rect4487"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="27.918732"
x="91.54583"
height="87.841667"
width="87.841667"
id="rect4487-1"
style="fill:#5f3262;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
transform="scale(1,-1)"
y="-115.7604"
x="181.23958"
height="87.841667"
width="87.841667"
id="rect4487-8"
style="fill:#9ba38f;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="207.30624"
x="181.23958"
height="87.841667"
width="87.841667"
id="rect4487-19"
style="fill:#9aa0af;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="117.61248"
x="181.23958"
height="87.841667"
width="87.841667"
id="rect4487-7"
style="fill:#e62a7c;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="27.918732"
x="1.8520833"
height="87.841667"
width="87.841667"
id="rect4487-2"
style="fill:#c5d0f2;fill-opacity:1;stroke:none;stroke-width:1.05833328;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="207.30623"
x="91.54583"
height="87.841667"
width="87.841667"
id="rect4487-23"
style="fill:#9a0c98;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="207.30623"
x="1.8520833"
height="87.841667"
width="87.841667"
id="rect4487-66"
style="fill:#e4cec8;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="117.61248"
x="1.8520833"
height="87.841667"
width="87.841667"
id="rect4487-4"
style="fill:#fd6bfc;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<path
sodipodi:type="star"
style="opacity:0.57999998;fill:#000000;fill-opacity:1;stroke-width:0.98095167;filter:url(#filter4516)"
id="path4661"
sodipodi:sides="3"
sodipodi:cx="127.79939"
sodipodi:cy="161.75498"
sodipodi:r1="102.49749"
sodipodi:r2="97.404572"
sodipodi:arg1="0.0043254268"
sodipodi:arg2="1.051523"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 230.29592,162.19832 76.16718,250.2979 76.935074,72.768703 Z"
inkscape:transform-center-x="16.901764"
inkscape:transform-center-y="-1.779849" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7 KiB