Add audio module

pull/55/head
reionwong 4 years ago
parent 5ec4af21e4
commit af0feedd0b

4
debian/changelog vendored

@ -1,8 +1,8 @@
cutefish-settings (0.6) UNRELEASED; urgency=high
cutefish-settings (0.6.1) UNRELEASED; urgency=high
* Update <support@cutefishos.com>
-- CutefishOS <support@cutefishos.com> Sun, 21 Nov 2021 13:52:29 +0800
-- CutefishOS <support@cutefishos.com> Sun, 21 Nov 2021 15:07:59 +0800
cutefish-settings (0.5.1) UNRELEASED; urgency=high

@ -0,0 +1,4 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<rect x="5" y="1.001" width="6" height="10" ry="3" fill="#FFFFFF" fill-rule="evenodd"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6 1.967 4.725 4.5 4.975v1.024h-2a0.5 0.5 0 1 0 0 1h5a0.5 0.5 0 1 0 0-1h-2v-1.025a4.988 4.988 0 0 0 4.5-4.975v-1.5a0.5 0.5 0 1 0-1 0v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z" fill="#FFFFFF" fill-rule="evenodd"/>
</svg>

After

Width:  |  Height:  |  Size: 469 B

@ -0,0 +1,4 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path d="m8 1.002c-1.662 0-3 1.338-3 3v4c0 1.662 1.338 3 3 3s3-1.338 3-3v-4c0-1.662-1.338-3-3-3zm0 1c1.108 0 2 0.892 2 2v4c0 1.108-0.892 2-2 2s-2-0.892-2-2v-4c0-1.108 0.892-2 2-2z" fill="#FFFFFF" fill-rule="evenodd"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6 1.967 4.725 4.5 4.975v1.024h-2a0.5 0.5 0 1 0 0 1h5a0.5 0.5 0 1 0 0-1h-2v-1.025a4.988 4.988 0 0 0 4.5-4.975v-1.5a0.5 0.5 0 1 0-1 0v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z" fill="#FFFFFF" fill-rule="evenodd"/>
</svg>

After

Width:  |  Height:  |  Size: 599 B

@ -0,0 +1,7 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g fill="#FFFFFF" fill-rule="evenodd">
<path d="m8 1.002c-1.662 0-3 1.338-3 3v4c0 1.662 1.338 3 3 3s3-1.338 3-3v-4c0-1.662-1.338-3-3-3zm0 1c1.108 0 2 0.892 2 2v4c0 1.108-0.892 2-2 2s-2-0.892-2-2v-4c0-1.108 0.892-2 2-2z"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6 1.967 4.725 4.5 4.975v1.024h-2a0.5 0.5 0 1 0 0 1h5a0.5 0.5 0 1 0 0-1h-2v-1.025a4.988 4.988 0 0 0 4.5-4.975v-1.5a0.5 0.5 0 1 0-1 0v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z"/>
<path d="m5 6.002v2c0 1.662 1.338 3 3 3s3-1.338 3-3v-2z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 638 B

@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#FFFFFF">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 820 B

@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#FFFFFF">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z" opacity=".35"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z" opacity=".35"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 848 B

@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#FFFFFF">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z" opacity=".35"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 834 B

@ -0,0 +1,17 @@
<?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="16" height="16" version="1.1" id="svg16" sodipodi:docname="audio-volume-muted-symbolic.svg" inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata id="metadata22">
<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="defs20" />
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="2062" inkscape:window-height="1410" id="namedview18" showgrid="false" inkscape:zoom="45.9375" inkscape:cx="8" inkscape:cy="8" inkscape:window-x="98" inkscape:window-y="30" inkscape:window-maximized="1" inkscape:current-layer="svg16" />
<rect y="5.9995208" width="5" height="4" ry="1" fill-rule="evenodd" id="rect2" x="0" style="fill:white;fill-opacity:1" />
<path d="m 6,2.9995209 -3,3 v 4 l 3,3.0000001 z" id="path4" style="fill:white;fill-opacity:1" />
<path style="color:black;display:inline;overflow:visible;visibility:visible;opacity:1;fill:white;fill-opacity:0.69999999;fill-rule:nonzero;stroke:none;stroke-width:0.422161;marker:none;enable-background:accumulate" d="M 9.721371,4.37179 8.62099,5.4538899 11.210117,8.000004 8.62099,10.546115 9.721371,11.62821 12.310494,9.0821003 14.899622,11.62821 16,10.546115 13.410872,8.000004 16,5.4538899 14.899622,4.37179 12.310494,6.9179037 Z" id="rect3019" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccccccc" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,4 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<rect x="5" y="1.001" width="6" height="10" ry="3" fill="#363636" fill-rule="evenodd"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6 1.967 4.725 4.5 4.975v1.024h-2a0.5 0.5 0 1 0 0 1h5a0.5 0.5 0 1 0 0-1h-2v-1.025a4.988 4.988 0 0 0 4.5-4.975v-1.5a0.5 0.5 0 1 0-1 0v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z" fill="#363636" fill-rule="evenodd"/>
</svg>

After

Width:  |  Height:  |  Size: 469 B

@ -0,0 +1,4 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path d="m8 1.002c-1.662 0-3 1.338-3 3v4c0 1.662 1.338 3 3 3s3-1.338 3-3v-4c0-1.662-1.338-3-3-3zm0 1c1.108 0 2 0.892 2 2v4c0 1.108-0.892 2-2 2s-2-0.892-2-2v-4c0-1.108 0.892-2 2-2z" fill="#363636" fill-rule="evenodd"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6 1.967 4.725 4.5 4.975v1.024h-2a0.5 0.5 0 1 0 0 1h5a0.5 0.5 0 1 0 0-1h-2v-1.025a4.988 4.988 0 0 0 4.5-4.975v-1.5a0.5 0.5 0 1 0-1 0v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z" fill="#363636" fill-rule="evenodd"/>
</svg>

After

Width:  |  Height:  |  Size: 599 B

@ -0,0 +1,7 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g fill="#363636" fill-rule="evenodd">
<path d="m8 1.002c-1.662 0-3 1.338-3 3v4c0 1.662 1.338 3 3 3s3-1.338 3-3v-4c0-1.662-1.338-3-3-3zm0 1c1.108 0 2 0.892 2 2v4c0 1.108-0.892 2-2 2s-2-0.892-2-2v-4c0-1.108 0.892-2 2-2z"/>
<path d="m3.5 6.001c-0.277 0-0.5 0.223-0.5 0.5v1.5c0 2.6 1.967 4.725 4.5 4.975v1.024h-2a0.5 0.5 0 1 0 0 1h5a0.5 0.5 0 1 0 0-1h-2v-1.025a4.988 4.988 0 0 0 4.5-4.975v-1.5a0.5 0.5 0 1 0-1 0v1.5c0 2.216-1.784 4-4 4s-4-1.784-4-4v-1.5c0-0.277-0.223-0.5-0.5-0.5z"/>
<path d="m5 6.002v2c0 1.662 1.338 3 3 3s3-1.338 3-3v-2z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 638 B

@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#333333">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 820 B

@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#333333">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z" opacity=".35"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z" opacity=".35"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 848 B

@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#333333">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z" opacity=".35"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 834 B

@ -0,0 +1,17 @@
<?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="16" height="16" version="1.1" id="svg16" sodipodi:docname="audio-volume-muted-symbolic.svg" inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata id="metadata22">
<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="defs20" />
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="2064" inkscape:window-height="1410" id="namedview18" showgrid="false" inkscape:zoom="45.9375" inkscape:cx="9.4670781" inkscape:cy="8" inkscape:window-x="96" inkscape:window-y="30" inkscape:window-maximized="1" inkscape:current-layer="svg16" inkscape:document-rotation="0" />
<rect y="5.9995208" width="5" height="4" ry="1" fill-rule="evenodd" id="rect2" x="0" style="fill:#333;fill-opacity:1" />
<path d="m 6,2.9995209 -3,3 v 4 l 3,3.0000001 z" id="path4" style="fill:#333;fill-opacity:1" />
<path style="color:black;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.422161;marker:none;enable-background:accumulate" d="M 9.7213708,4.37179 8.62099,5.4538899 11.210117,8.000004 8.62099,10.546115 9.7213708,11.62821 12.310494,9.0821003 14.899622,11.62821 16,10.546115 13.410872,8.000004 16,5.4538899 14.899622,4.37179 12.310494,6.9179037 Z" id="rect3019" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccccccc" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,11 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -.00047914)" fill="#FFFFFF">
<rect y="6" width="5" height="4" ry="1" fill-rule="evenodd"/>
<path d="m6 3-3 3v4l3 3z"/>
<g fill-rule="evenodd">
<path d="M 13.139,1.428 C 12.594,1 12,1.652 12.455,2.16 A 8,8 0 0 1 15,8 8,8 0 0 1 12.446,13.852 C 12,14.323 12.626,15 13.123,14.58 A 9,9 0 0 0 16,8 9,9 0 0 0 13.139,1.428 Z"/>
<path d="m10.775 2.889c-0.587-0.535-1.199 0.225-0.684 0.732a6 6 0 0 1 1.909 4.379 6 6 0 0 1-1.916 4.389c-0.469 0.446 0.173 1.146 0.68 0.728a7 7 0 0 0 2.236-5.117 7 7 0 0 0-2.225-5.111z"/>
<path d="M 8.41,4.35 C 7.89,3.856 7.255,4.57 7.727,5.08 A 4,4 0 0 1 9,8 4,4 0 0 1 7.723,10.926 c -0.473,0.43 0.14,1.152 0.68,0.73 A 5,5 0 0 0 10,8 5,5 0 0 0 8.41,4.35 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 820 B

@ -135,10 +135,6 @@ ItemPage {
Layout.fillWidth: true
height: 40
text: networkProxy.httpProxy
validator: RegExpValidator {
regExp: /(?=(\b|\D))(((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))\.){3}((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))(?=(\b|\D))/
}
onEditingFinished: {
networkProxy.httpProxy = httpProxyField.text
}
@ -195,9 +191,6 @@ ItemPage {
height: 40
enabled: !forFtpCheckBox.checked
text: networkProxy.ftpProxy
validator: RegExpValidator {
regExp: /(?=(\b|\D))(((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))\.){3}((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))(?=(\b|\D))/
}
onEditingFinished: {
networkProxy.ftpProxy = ftpProxyTextField.text
}
@ -230,10 +223,6 @@ ItemPage {
id: socksProxyField
Layout.fillWidth: true
height: 40
validator: RegExpValidator {
regExp: /(?=(\b|\D))(((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))\.){3}((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))(?=(\b|\D))/
}
text: networkProxy.socksProxy
onEditingFinished: {

@ -159,6 +159,15 @@ Item {
category: qsTr("System")
}
ListElement {
title: qsTr("Sound")
name: "sound"
page: "qrc:/qml/Sound/Main.qml"
iconSource: "sound.svg"
iconColor: "#F16884"
category: qsTr("System")
}
ListElement {
title: qsTr("Mouse")
name: "mouse"

@ -0,0 +1,235 @@
/*
* Copyright (C) 2021 CutefishOS Team.
*
* Author: revenmartin <revenmartin@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import FishUI 1.0 as FishUI
import Cutefish.Settings 1.0
import Cutefish.Audio 1.0
import "../"
ItemPage {
headerTitle: qsTr("Sound")
function audioIcon(value) {
if (value <= 0)
return "audio-volume-muted-symbolic"
else if (value <= 25)
return "audio-volume-low-symbolic"
else if (value <= 75)
return "audio-volume-medium-symbolic"
else
return "audio-volume-high-symbolic"
}
function microphoneIcon(value) {
if (value <= 25)
return "audio-input-microphone-low-symbolic"
else if (value <= 50)
return "audio-input-microphone-medium-symbolic"
else
return "audio-input-microphone-high-symbolic"
}
SinkModel {
id: paSinkModel
}
SourceModel {
id: paSourceModel
}
PulseObjectFilterModel {
id: paSinkFilterModel
sortRole: "SortByDefault"
sortOrder: Qt.DescendingOrder
filterOutInactiveDevices: true
sourceModel: paSinkModel
}
PulseObjectFilterModel {
id: paSourceFilterModel
sortRole: "SortByDefault"
sortOrder: Qt.DescendingOrder
filterOutInactiveDevices: true
sourceModel: paSourceModel
}
Scrollable {
anchors.fill: parent
contentHeight: layout.implicitHeight
ColumnLayout {
id: layout
anchors.fill: parent
// Playback Devices
ListView {
id: sinks
Layout.fillWidth: true
interactive: false
spacing: FishUI.Units.largeSpacing
Layout.preferredHeight: {
var totalHeight = 0
for (var i = 0; i < sinks.visibleChildren.length; ++i) {
totalHeight += sinks.visibleChildren[i].height
}
return totalHeight
}
model: paSinkFilterModel
delegate: Item {
width: ListView.view.width
height: _itemLayout.implicitHeight + FishUI.Units.largeSpacing * 2
readonly property var currentPort: Ports[ActivePortIndex]
Rectangle {
anchors.fill: parent
color: FishUI.Theme.secondBackgroundColor
radius: FishUI.Theme.bigRadius
}
ColumnLayout {
id: _itemLayout
anchors.fill: parent
anchors.margins: FishUI.Units.largeSpacing
spacing: FishUI.Units.largeSpacing
Label {
text: !currentPort ? Description : currentPort.description
}
RowLayout {
spacing: FishUI.Units.largeSpacing
Image {
Layout.leftMargin: 2
height: 16
width: height
sourceSize: Qt.size(width, height)
source: "qrc:/images/" + (FishUI.Theme.darkMode ? "dark" : "light") + "/" + audioIcon(slider.value / slider.to * 100) + ".svg"
smooth: false
antialiasing: true
}
Slider {
id: slider
Layout.fillWidth: true
value: Volume
from: PulseAudio.MinimalVolume
to: PulseAudio.MaximalVolume
enabled: VolumeWritable
visible: HasVolume
ToolTip {
parent: slider.handle
visible: slider.pressed
text: (slider.value / slider.to * 100).toFixed(0)
}
onMoved: {
Volume = value
Muted = (value === 0)
}
}
}
}
}
}
Item {
height: FishUI.Units.largeSpacing * 2
}
// Recording Devices
ListView {
id: sinkInputView
Layout.fillWidth: true
Layout.preferredHeight: contentHeight
interactive: false
spacing: FishUI.Units.largeSpacing
model: paSourceFilterModel
delegate: Item {
width: ListView.view.width
height: _layout.implicitHeight + FishUI.Units.largeSpacing * 2
readonly property var currentPort: Ports[ActivePortIndex]
Rectangle {
anchors.fill: parent
color: FishUI.Theme.secondBackgroundColor
radius: FishUI.Theme.bigRadius
}
ColumnLayout {
id: _layout
anchors.fill: parent
anchors.margins: FishUI.Units.largeSpacing
spacing: FishUI.Units.largeSpacing
Label {
text: !currentPort ? Description : currentPort.description
}
RowLayout {
spacing: FishUI.Units.largeSpacing
Image {
Layout.leftMargin: 2
height: 16
width: height
sourceSize: Qt.size(width, height)
source: "qrc:/images/" + (FishUI.Theme.darkMode ? "dark" : "light") + "/" + microphoneIcon(_slider.value / _slider.to * 100) + ".svg"
smooth: false
antialiasing: true
}
Slider {
id: _slider
Layout.fillWidth: true
value: Volume
from: PulseAudio.MinimalVolume
to: PulseAudio.MaximalVolume
enabled: VolumeWritable
visible: HasVolume
onMoved: {
Volume = value
Muted = (value === 0)
}
ToolTip {
parent: _slider.handle
visible: _slider.pressed
text: (_slider.value / _slider.to * 100).toFixed(0)
}
}
}
}
}
}
}
}
}

@ -123,5 +123,21 @@
<file>qml/VPN/Main.qml</file>
<file>qml/Proxy/Main.qml</file>
<file>images/sidebar/dark/proxy.svg</file>
<file>qml/Sound/Main.qml</file>
<file>images/sidebar/dark/sound.svg</file>
<file>images/light/audio-volume-high-symbolic.svg</file>
<file>images/light/audio-volume-low-symbolic.svg</file>
<file>images/light/audio-volume-medium-symbolic.svg</file>
<file>images/light/audio-volume-muted-symbolic.svg</file>
<file>images/dark/audio-volume-high-symbolic.svg</file>
<file>images/dark/audio-volume-low-symbolic.svg</file>
<file>images/dark/audio-volume-medium-symbolic.svg</file>
<file>images/dark/audio-volume-muted-symbolic.svg</file>
<file>images/light/audio-input-microphone-high-symbolic.svg</file>
<file>images/light/audio-input-microphone-low-symbolic.svg</file>
<file>images/light/audio-input-microphone-medium-symbolic.svg</file>
<file>images/dark/audio-input-microphone-high-symbolic.svg</file>
<file>images/dark/audio-input-microphone-low-symbolic.svg</file>
<file>images/dark/audio-input-microphone-medium-symbolic.svg</file>
</qresource>
</RCC>

@ -708,42 +708,47 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="87"/>
<location filename="../src/qml/Proxy/Main.qml" line="88"/>
<source>Use manually specified proxy configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="115"/>
<location filename="../src/qml/Proxy/Main.qml" line="116"/>
<source>Select file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="129"/>
<location filename="../src/qml/Proxy/Main.qml" line="130"/>
<source>HTTP Proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="144"/>
<location filename="../src/qml/Proxy/Main.qml" line="198"/>
<location filename="../src/qml/Proxy/Main.qml" line="232"/>
<location filename="../src/qml/Proxy/Main.qml" line="200"/>
<location filename="../src/qml/Proxy/Main.qml" line="234"/>
<source>Port</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="165"/>
<location filename="../src/qml/Proxy/Main.qml" line="167"/>
<source>Also use this proxy for FTP</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="181"/>
<location filename="../src/qml/Proxy/Main.qml" line="185"/>
<source>FTP Proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="216"/>
<location filename="../src/qml/Proxy/Main.qml" line="219"/>
<source>SOCKS Proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Sound/Main.qml" line="29"/>
<source>Sound</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PairDialog</name>
@ -841,7 +846,7 @@
<translation type="unfinished">Appearance</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="163"/>
<location filename="../src/qml/SideBar.qml" line="172"/>
<source>Mouse</source>
<translation type="unfinished"></translation>
</message>
@ -869,41 +874,47 @@
<location filename="../src/qml/SideBar.qml" line="159"/>
<location filename="../src/qml/SideBar.qml" line="168"/>
<location filename="../src/qml/SideBar.qml" line="177"/>
<location filename="../src/qml/SideBar.qml" line="195"/>
<location filename="../src/qml/SideBar.qml" line="213"/>
<location filename="../src/qml/SideBar.qml" line="186"/>
<location filename="../src/qml/SideBar.qml" line="204"/>
<location filename="../src/qml/SideBar.qml" line="222"/>
<location filename="../src/qml/SideBar.qml" line="231"/>
<location filename="../src/qml/SideBar.qml" line="240"/>
<location filename="../src/qml/SideBar.qml" line="249"/>
<source>System</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="172"/>
<location filename="../src/qml/SideBar.qml" line="163"/>
<source>Sound</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="181"/>
<source>Touchpad</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="190"/>
<location filename="../src/qml/SideBar.qml" line="199"/>
<source>Date &amp; Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="208"/>
<location filename="../src/qml/SideBar.qml" line="217"/>
<source>Language</source>
<translation type="unfinished">Language</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="217"/>
<location filename="../src/qml/SideBar.qml" line="226"/>
<source>Battery</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="226"/>
<location filename="../src/qml/SideBar.qml" line="235"/>
<source>Power</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="235"/>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>About</source>
<translation type="unfinished">About</translation>
</message>

@ -708,42 +708,47 @@
<translation>使 URL</translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="87"/>
<location filename="../src/qml/Proxy/Main.qml" line="88"/>
<source>Use manually specified proxy configuration</source>
<translation>使</translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="115"/>
<location filename="../src/qml/Proxy/Main.qml" line="116"/>
<source>Select file</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="129"/>
<location filename="../src/qml/Proxy/Main.qml" line="130"/>
<source>HTTP Proxy</source>
<translation>HTTP </translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="144"/>
<location filename="../src/qml/Proxy/Main.qml" line="198"/>
<location filename="../src/qml/Proxy/Main.qml" line="232"/>
<location filename="../src/qml/Proxy/Main.qml" line="200"/>
<location filename="../src/qml/Proxy/Main.qml" line="234"/>
<source>Port</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="165"/>
<location filename="../src/qml/Proxy/Main.qml" line="167"/>
<source>Also use this proxy for FTP</source>
<translation> FTP</translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="181"/>
<location filename="../src/qml/Proxy/Main.qml" line="185"/>
<source>FTP Proxy</source>
<translation>FTP </translation>
</message>
<message>
<location filename="../src/qml/Proxy/Main.qml" line="216"/>
<location filename="../src/qml/Proxy/Main.qml" line="219"/>
<source>SOCKS Proxy</source>
<translation>SOCKS </translation>
</message>
<message>
<location filename="../src/qml/Sound/Main.qml" line="29"/>
<source>Sound</source>
<translation></translation>
</message>
</context>
<context>
<name>PairDialog</name>
@ -831,7 +836,7 @@
<translation></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="163"/>
<location filename="../src/qml/SideBar.qml" line="172"/>
<source>Mouse</source>
<translation></translation>
</message>
@ -869,41 +874,47 @@
<location filename="../src/qml/SideBar.qml" line="159"/>
<location filename="../src/qml/SideBar.qml" line="168"/>
<location filename="../src/qml/SideBar.qml" line="177"/>
<location filename="../src/qml/SideBar.qml" line="195"/>
<location filename="../src/qml/SideBar.qml" line="213"/>
<location filename="../src/qml/SideBar.qml" line="186"/>
<location filename="../src/qml/SideBar.qml" line="204"/>
<location filename="../src/qml/SideBar.qml" line="222"/>
<location filename="../src/qml/SideBar.qml" line="231"/>
<location filename="../src/qml/SideBar.qml" line="240"/>
<location filename="../src/qml/SideBar.qml" line="249"/>
<source>System</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="172"/>
<location filename="../src/qml/SideBar.qml" line="163"/>
<source>Sound</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="181"/>
<source>Touchpad</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="190"/>
<location filename="../src/qml/SideBar.qml" line="199"/>
<source>Date &amp; Time</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="208"/>
<location filename="../src/qml/SideBar.qml" line="217"/>
<source>Language</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="217"/>
<location filename="../src/qml/SideBar.qml" line="226"/>
<source>Battery</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="226"/>
<location filename="../src/qml/SideBar.qml" line="235"/>
<source>Power</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="235"/>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>About</source>
<translation></translation>
</message>

Loading…
Cancel
Save