changed switch widget

This commit is contained in:
Daniel Gultsch 2015-07-18 19:38:52 +02:00
parent 451345f8ed
commit f58b2afcaa
39 changed files with 914 additions and 8 deletions

View File

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="md_switch_thumb_disable_centered_square.svg"
viewBox="0 0 120 120"
height="120"
width="120"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2">
<metadata
id="metadata8">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6">
<linearGradient
inkscape:collect="always"
id="linearGradient4222">
<stop
style="stop-color:#000000;stop-opacity:1"
offset="0"
id="stop4224" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop4226" />
</linearGradient>
<linearGradient
id="linearGradient4179"
osb:paint="gradient">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4181" />
<stop
style="stop-color:#ffffff;stop-opacity:0.25454545"
offset="1"
id="stop4183" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4222"
id="linearGradient4228"
x1="159.38722"
y1="19.802504"
x2="212.27522"
y2="19.802504"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-260.32215,163.27594)" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4230"
x="-0.012"
width="1.024"
y="-0.012"
height="1.024">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.25916904"
id="feGaussianBlur4232" />
</filter>
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4371"
x="-0.23999999"
width="1.48"
y="-0.23999999"
height="1.48">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="5.2888"
id="feGaussianBlur4373" />
</filter>
</defs>
<sodipodi:namedview
inkscape:current-layer="layer2"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="1400"
inkscape:cy="61.379767"
inkscape:cx="10.572032"
inkscape:zoom="3.8530612"
showgrid="false"
id="namedview4"
inkscape:window-height="1024"
inkscape:window-width="1680"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="PNG"
style="display:none"
sodipodi:insensitive="true"
transform="translate(0,-2.5)" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="SVG"
style="display:inline"
transform="translate(0,-2.5)">
<g
id="g6404">
<circle
style="opacity:1;fill:#000404;fill-opacity:0.45531915;stroke:none;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4371)"
id="circle4234"
cx="59.999996"
cy="66.499878"
r="26.444" />
<g
transform="translate(3.3103058e-6,0.33229253)"
id="g4148">
<circle
style="opacity:1;fill:#bdbdbd;fill-opacity:1;stroke:#bdbdbd;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4218"
cx="59.999996"
cy="62.167587"
r="25.916904" />
<circle
r="25.916904"
cy="183.07845"
cx="-74.490921"
id="circle4220"
style="opacity:0.3;fill:none;fill-opacity:1;stroke:url(#linearGradient4228);stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4230)"
transform="matrix(0,-1,1,0,-123.07845,-12.323334)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="md_switch_thumb_off_normal_centered.svg"
viewBox="0 0 120 120"
height="120"
width="120"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2">
<metadata
id="metadata8">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6">
<linearGradient
inkscape:collect="always"
id="linearGradient4222">
<stop
style="stop-color:#000000;stop-opacity:1"
offset="0"
id="stop4224" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop4226" />
</linearGradient>
<linearGradient
id="linearGradient4179"
osb:paint="gradient">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4181" />
<stop
style="stop-color:#ffffff;stop-opacity:0.25454545"
offset="1"
id="stop4183" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4222"
id="linearGradient4228"
x1="159.38722"
y1="19.802504"
x2="212.27522"
y2="19.802504"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-260.32215,163.27594)" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4230"
x="-0.012"
width="1.024"
y="-0.012"
height="1.024">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.25916904"
id="feGaussianBlur4232" />
</filter>
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4371"
x="-0.23999999"
width="1.48"
y="-0.23999999"
height="1.48">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="5.2888"
id="feGaussianBlur4373" />
</filter>
</defs>
<sodipodi:namedview
inkscape:current-layer="layer2"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="1400"
inkscape:cy="61.379767"
inkscape:cx="10.052965"
inkscape:zoom="3.8530612"
showgrid="false"
id="namedview4"
inkscape:window-height="1024"
inkscape:window-width="1680"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="PNG"
style="display:none"
sodipodi:insensitive="true"
transform="translate(0,-2.5)" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="SVG"
style="display:inline"
transform="translate(0,-2.5)">
<circle
r="26.444"
cy="66.5"
cx="59.999996"
id="circle4234"
style="opacity:1;fill:#000404;fill-opacity:0.45531915;stroke:none;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4371)" />
<g
id="g6390"
transform="translate(3.3103058e-6,-0.91758577)">
<circle
r="25.916904"
cy="63.417587"
cx="59.999996"
id="path4218"
style="opacity:1;fill:#fafafa;fill-opacity:1;stroke:#fafafa;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<circle
transform="matrix(0,-1,1,0,-123.07845,-11.073334)"
style="opacity:0.3;fill:none;fill-opacity:1;stroke:url(#linearGradient4228);stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4230)"
id="circle4220"
cx="-74.490921"
cy="183.07845"
r="25.916904" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="md_switch_thumb_off_pressed_centered.svg"
viewBox="0 0 120 120"
height="120"
width="120"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2">
<metadata
id="metadata8">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6">
<linearGradient
inkscape:collect="always"
id="linearGradient4222">
<stop
style="stop-color:#000000;stop-opacity:1"
offset="0"
id="stop4224" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop4226" />
</linearGradient>
<linearGradient
id="linearGradient4179"
osb:paint="gradient">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4181" />
<stop
style="stop-color:#ffffff;stop-opacity:0.25454545"
offset="1"
id="stop4183" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4222"
id="linearGradient4228"
x1="159.38722"
y1="19.802504"
x2="212.27522"
y2="19.802504"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-260.32215,163.27594)" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4230"
x="-0.012"
width="1.024"
y="-0.012"
height="1.024">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.25916904"
id="feGaussianBlur4232" />
</filter>
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4371"
x="-0.23999999"
width="1.48"
y="-0.23999999"
height="1.48">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="5.2888"
id="feGaussianBlur4373" />
</filter>
</defs>
<sodipodi:namedview
inkscape:current-layer="layer2"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="1400"
inkscape:cy="61.379767"
inkscape:cx="10.572032"
inkscape:zoom="3.8530612"
showgrid="false"
id="namedview4"
inkscape:window-height="1024"
inkscape:window-width="1680"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="PNG"
style="display:none"
sodipodi:insensitive="true"
transform="translate(0,-2.5)" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="SVG"
style="display:inline"
transform="translate(0,-2.5)">
<circle
style="opacity:1;fill:#313131;fill-opacity:0.10196078;fill-rule:nonzero;stroke:none;stroke-width:1.00100005;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.10196078"
id="path4819"
cx="60"
cy="62.5"
r="60" />
<circle
r="26.444"
cy="66.5"
cx="59.999996"
id="circle4234"
style="opacity:1;fill:#000404;fill-opacity:0.45531915;stroke:none;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4371)" />
<g
id="g6417"
transform="translate(3.3103058e-6,-0.91758577)">
<circle
r="25.916904"
cy="63.417587"
cx="59.999996"
id="path4218"
style="opacity:1;fill:#fafafa;fill-opacity:1;stroke:#fafafa;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<circle
transform="matrix(0,-1,1,0,-123.07845,-11.073334)"
style="opacity:0.3;fill:none;fill-opacity:1;stroke:url(#linearGradient4228);stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4230)"
id="circle4220"
cx="-74.490921"
cy="183.07845"
r="25.916904" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="md_switch_thumb_on_normal_centered_square.svg"
viewBox="0 0 120 120"
height="120"
width="120"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2">
<metadata
id="metadata8">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6">
<linearGradient
inkscape:collect="always"
id="linearGradient4222">
<stop
style="stop-color:#000000;stop-opacity:1"
offset="0"
id="stop4224" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop4226" />
</linearGradient>
<linearGradient
id="linearGradient4179"
osb:paint="gradient">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4181" />
<stop
style="stop-color:#ffffff;stop-opacity:0.25454545"
offset="1"
id="stop4183" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4222"
id="linearGradient4228"
x1="159.38722"
y1="19.802504"
x2="212.27522"
y2="19.802504"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-260.32215,163.27594)" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4230"
x="-0.012"
width="1.024"
y="-0.012"
height="1.024">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.25916904"
id="feGaussianBlur4232" />
</filter>
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4371"
x="-0.23999999"
width="1.48"
y="-0.23999999"
height="1.48">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="5.2888"
id="feGaussianBlur4373" />
</filter>
</defs>
<sodipodi:namedview
inkscape:current-layer="layer2"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="1400"
inkscape:cy="61.379767"
inkscape:cx="-14.397519"
inkscape:zoom="3.8530612"
showgrid="false"
id="namedview4"
inkscape:window-height="1024"
inkscape:window-width="1680"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="SVG"
style="display:inline"
transform="translate(0,-2.5)">
<circle
r="26.444"
cy="66.499878"
cx="59.999996"
id="circle4234"
style="opacity:1;fill:#000404;fill-opacity:0.45531915;stroke:none;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4371)" />
<g
id="g6440"
transform="translate(3.3103058e-6,0.33241423)">
<circle
r="25.916904"
cy="62.167587"
cx="59.999996"
id="path4218"
style="opacity:1;fill:#0091ea;fill-opacity:1;stroke:#0091ea;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<circle
transform="matrix(0,-1,1,0,-123.07845,-12.323334)"
style="opacity:0.3;fill:none;fill-opacity:1;stroke:url(#linearGradient4228);stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4230)"
id="circle4220"
cx="-74.490921"
cy="183.07845"
r="25.916904" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="md_switch_thumb_on_pressed_centered_square.svg"
viewBox="0 0 120 120"
height="120"
width="120"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2">
<metadata
id="metadata8">
<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>
<defs
id="defs6">
<linearGradient
inkscape:collect="always"
id="linearGradient4222">
<stop
style="stop-color:#000000;stop-opacity:1"
offset="0"
id="stop4224" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop4226" />
</linearGradient>
<linearGradient
id="linearGradient4179"
osb:paint="gradient">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4181" />
<stop
style="stop-color:#ffffff;stop-opacity:0.25454545"
offset="1"
id="stop4183" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4222"
id="linearGradient4228"
x1="159.38722"
y1="19.802504"
x2="212.27522"
y2="19.802504"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-260.32215,163.27594)" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4230"
x="-0.012"
width="1.024"
y="-0.012"
height="1.024">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.25916904"
id="feGaussianBlur4232" />
</filter>
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter4371"
x="-0.23999999"
width="1.48"
y="-0.23999999"
height="1.48">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="5.2888"
id="feGaussianBlur4373" />
</filter>
</defs>
<sodipodi:namedview
inkscape:current-layer="layer2"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="1400"
inkscape:cy="61.379767"
inkscape:cx="-46.31369"
inkscape:zoom="3.8530612"
showgrid="false"
id="namedview4"
inkscape:window-height="1024"
inkscape:window-width="1680"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="PNG"
style="display:none"
sodipodi:insensitive="true"
transform="translate(0,-2.5)" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="SVG"
style="display:inline"
transform="translate(0,-2.5)">
<circle
style="opacity:1;fill:#0093e8;fill-opacity:0.10196078;fill-rule:nonzero;stroke:none;stroke-width:1.00100005;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.10196078"
id="path4819"
cx="60"
cy="62.5"
r="60" />
<g
id="g4156">
<circle
style="opacity:1;fill:#000404;fill-opacity:0.45531915;stroke:none;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4371)"
id="circle4234"
cx="59.999996"
cy="66.5"
r="26.444" />
<g
transform="translate(3.3103058e-6,0.33241423)"
id="g4149">
<circle
style="opacity:1;fill:#0091ea;fill-opacity:1;stroke:#0091ea;stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4218"
cx="59.999996"
cy="62.167587"
r="25.916904" />
<circle
r="25.916904"
cy="183.07845"
cx="-74.490921"
id="circle4220"
style="opacity:0.3;fill:none;fill-opacity:1;stroke:url(#linearGradient4228);stroke-width:1.05419147;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4230)"
transform="matrix(0,-1,1,0,-123.07845,-12.323334)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -33,7 +33,12 @@ images = {
'ic_send_picture_online.svg' => ['ic_send_picture_online', 36],
'ic_send_picture_offline.svg' => ['ic_send_picture_offline', 36],
'ic_send_picture_away.svg' => ['ic_send_picture_away', 36],
'ic_send_picture_dnd.svg' => ['ic_send_picture_dnd', 36]
'ic_send_picture_dnd.svg' => ['ic_send_picture_dnd', 36],
'md_switch_thumb_disable.svg' => ['switch_thumb_disable', 48],
'md_switch_thumb_off_normal.svg' => ['switch_thumb_off_normal', 48],
'md_switch_thumb_off_pressed.svg' => ['switch_thumb_off_pressed', 48],
'md_switch_thumb_on_normal.svg' => ['switch_thumb_on_normal', 48],
'md_switch_thumb_on_pressed.svg' => ['switch_thumb_on_pressed', 48],
}
images.each do |source, result|
resolutions.each do |name, factor|

View File

@ -36,6 +36,7 @@ dependencies {
compile 'de.measite.minidns:minidns:0.1.3'
compile 'de.timroes.android:EnhancedListView:0.3.4'
compile 'me.leolin:ShortcutBadger:1.1.1@aar'
compile 'com.kyleduo.switchbutton:library:1.2.8'
}
android {

View File

@ -6,6 +6,8 @@ import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.ui.XmppActivity;
import eu.siacs.conversations.ui.ManageAccountActivity;
import eu.siacs.conversations.ui.widget.Switch;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
@ -14,7 +16,6 @@ import android.widget.ArrayAdapter;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Switch;
public class AccountAdapter extends ArrayAdapter<Account> {
@ -53,8 +54,7 @@ public class AccountAdapter extends ArrayAdapter<Account> {
}
final Switch tglAccountState = (Switch) view.findViewById(R.id.tgl_account_status);
final boolean isDisabled = (account.getStatus() == Account.State.DISABLED);
tglAccountState.setOnCheckedChangeListener(null);
tglAccountState.setChecked(!isDisabled);
tglAccountState.setChecked(!isDisabled,false);
tglAccountState.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {

View File

@ -0,0 +1,70 @@
package eu.siacs.conversations.ui.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import com.kyleduo.switchbutton.SwitchButton;
import eu.siacs.conversations.Config;
public class Switch extends SwitchButton {
private int mTouchSlop;
private int mClickTimeout;
private float mStartX;
private float mStartY;
private OnClickListener mOnClickListener;
public Switch(Context context) {
super(context);
mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop();
mClickTimeout = ViewConfiguration.getPressedStateDuration() + ViewConfiguration.getTapTimeout();
}
public Switch(Context context, AttributeSet attrs) {
super(context, attrs);
mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop();
mClickTimeout = ViewConfiguration.getPressedStateDuration() + ViewConfiguration.getTapTimeout();
}
public Switch(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop();
mClickTimeout = ViewConfiguration.getPressedStateDuration() + ViewConfiguration.getTapTimeout();
}
@Override
public void setOnClickListener(OnClickListener onClickListener) {
this.mOnClickListener = onClickListener;
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (!isEnabled()) {
float deltaX = event.getX() - mStartX;
float deltaY = event.getY() - mStartY;
int action = event.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:
mStartX = event.getX();
mStartY = event.getY();
break;
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
float time = event.getEventTime() - event.getDownTime();
if (deltaX < mTouchSlop && deltaY < mTouchSlop && time < mClickTimeout) {
if (mOnClickListener != null) {
this.mOnClickListener.onClick(this);
}
}
break;
default:
break;
}
return true;
}
return super.onTouchEvent(event);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"><shape android:shape="rectangle">
<solid android:color="#D5D5D5" />
<corners android:radius="99dp" />
</shape></item>
<item android:state_enabled="true"><shape android:shape="rectangle">
<solid android:color="#939393" />
<corners android:radius="99dp" />
</shape></item>
</selector>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="#D5D5D5"/>
<corners android:radius="99dp"/>
</shape>
</item>
<item android:state_enabled="true">
<shape android:shape="rectangle">
<!-- 30% accent on white -->
<solid android:color="#b3ddf7"/>
<corners android:radius="99dp"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/switch_thumb_disable" android:state_enabled="false"/>
<item android:drawable="@drawable/switch_thumb_on_pressed" android:state_checked="true" android:state_pressed="true"/>
<item android:drawable="@drawable/switch_thumb_on_pressed" android:state_checked="true" android:state_focused="true"/>
<item android:drawable="@drawable/switch_thumb_on_normal" android:state_checked="true"/>
<item android:drawable="@drawable/switch_thumb_off_pressed" android:state_checked="false" android:state_pressed="true"/>
<item android:drawable="@drawable/switch_thumb_off_pressed" android:state_checked="false" android:state_focused="true"/>
<item android:drawable="@drawable/switch_thumb_off_normal" android:state_checked="false"/>
</selector>

View File

@ -45,13 +45,14 @@
android:textStyle="bold" />
</LinearLayout>
<Switch
<eu.siacs.conversations.ui.widget.Switch
style="@style/MD"
android:id="@+id/tgl_account_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:padding="8dp"
android:padding="16dp"
android:focusable="false"/>
</RelativeLayout>

View File

@ -4,8 +4,18 @@
<item name="android:layout_height">1.5dp</item>
<item name="android:background">@color/black12</item>
</style>
<style name="Tag">
<style name="MD">
<item name="animationVelocity">6</item>
<item name="insetBottom">16dp</item>
<item name="insetTop">16dp</item>
<item name="insetLeft">16dp</item>
<item name="insetRight">16dp</item>
<item name="measureFactor">1.4</item>
<item name="offDrawable">@drawable/switch_back_off</item>
<item name="onDrawable">@drawable/switch_back_on</item>
<item name="thumbDrawable">@drawable/switch_thumb</item>
<item name="thumb_margin">-17dp</item>
<item name="android:padding">16dp</item>
</style>
</resources>