summaryrefslogtreecommitdiffstats
path: root/examples/network/torrent
diff options
context:
space:
mode:
authorMatthias Rauter <matthias.rauter@qt.io>2023-12-14 11:14:03 +0100
committerMatthias Rauter <matthias.rauter@qt.io>2023-12-18 13:56:04 +0100
commit0da459ec5bc5c92aed5de0e819778b6dd891ceef (patch)
tree4d7bcc44c71d107f8f5bbb3ad68f50b333c5b15e /examples/network/torrent
parenta659dcf031e6c4ce112a9ec2e6d8f94f3ce96992 (diff)
Update icons in the torrent example
Fixes: QTBUG-118876 Change-Id: I7b3c24db220a0501bc2b99341589211bdf217c05 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'examples/network/torrent')
-rw-r--r--examples/network/torrent/CMakeLists.txt17
-rw-r--r--examples/network/torrent/icons.qrc23
-rw-r--r--examples/network/torrent/icons/1downarrow.pngbin895 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/1downarrow.svg3
-rw-r--r--examples/network/torrent/icons/1uparrow.pngbin822 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/1uparrow.svg3
-rw-r--r--examples/network/torrent/icons/about.svg4
-rw-r--r--examples/network/torrent/icons/bottom.pngbin1632 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/bottom.svg6
-rw-r--r--examples/network/torrent/icons/edit_add.pngbin394 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/edit_add.svg4
-rw-r--r--examples/network/torrent/icons/edit_remove.pngbin368 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/edit_remove.svg3
-rw-r--r--examples/network/torrent/icons/exit.pngbin1426 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/exit.svg4
-rw-r--r--examples/network/torrent/icons/peertopeer.pngbin10072 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/peertopeer.svg62
-rw-r--r--examples/network/torrent/icons/player_pause.pngbin690 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/player_pause.svg6
-rw-r--r--examples/network/torrent/icons/player_play.pngbin900 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/player_play.svg3
-rw-r--r--examples/network/torrent/icons/player_stop.pngbin627 -> 0 bytes
-rw-r--r--examples/network/torrent/icons/player_stop.svg5
-rw-r--r--examples/network/torrent/icons/stop.pngbin1252 -> 0 bytes
-rw-r--r--examples/network/torrent/mainwindow.cpp37
25 files changed, 144 insertions, 36 deletions
diff --git a/examples/network/torrent/CMakeLists.txt b/examples/network/torrent/CMakeLists.txt
index 3a02f5def1..6b1ca6d98b 100644
--- a/examples/network/torrent/CMakeLists.txt
+++ b/examples/network/torrent/CMakeLists.txt
@@ -44,14 +44,15 @@ target_link_libraries(torrent PRIVATE
# Resources:
set(icons_resource_files
- "icons/1downarrow.png"
- "icons/1uparrow.png"
- "icons/bottom.png"
- "icons/exit.png"
- "icons/peertopeer.png"
- "icons/player_pause.png"
- "icons/player_play.png"
- "icons/player_stop.png"
+ "icons/1downarrow.svg"
+ "icons/1uparrow.svg"
+ "icons/bottom.svg"
+ "icons/exit.svg"
+ "icons/peertopeer.svg"
+ "icons/player_pause.svg"
+ "icons/player_play.svg"
+ "icons/player_stop.svg"
+ "icons/about.svg"
)
qt_add_resources(torrent "icons"
diff --git a/examples/network/torrent/icons.qrc b/examples/network/torrent/icons.qrc
index 9541ef7600..5606275d92 100644
--- a/examples/network/torrent/icons.qrc
+++ b/examples/network/torrent/icons.qrc
@@ -1,12 +1,13 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/">
- <file>icons/peertopeer.png</file>
- <file>icons/1uparrow.png</file>
- <file>icons/1downarrow.png</file>
- <file>icons/bottom.png</file>
- <file>icons/player_pause.png</file>
- <file>icons/player_play.png</file>
- <file>icons/player_stop.png</file>
- <file>icons/exit.png</file>
-</qresource>
+<RCC>
+ <qresource prefix="/">
+ <file>icons/peertopeer.svg</file>
+ <file>icons/1uparrow.svg</file>
+ <file>icons/1downarrow.svg</file>
+ <file>icons/bottom.svg</file>
+ <file>icons/player_pause.svg</file>
+ <file>icons/player_play.svg</file>
+ <file>icons/player_stop.svg</file>
+ <file>icons/exit.svg</file>
+ <file>icons/about.svg</file>
+ </qresource>
</RCC>
diff --git a/examples/network/torrent/icons/1downarrow.png b/examples/network/torrent/icons/1downarrow.png
deleted file mode 100644
index 08403b82ba..0000000000
--- a/examples/network/torrent/icons/1downarrow.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/1downarrow.svg b/examples/network/torrent/icons/1downarrow.svg
new file mode 100644
index 0000000000..fc43085f59
--- /dev/null
+++ b/examples/network/torrent/icons/1downarrow.svg
@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M21.7071 7.29289C21.3166 6.90237 20.6834 6.90237 20.2929 7.29289L12 15.5858L3.70711 7.29289C3.31658 6.90237 2.68342 6.90237 2.29289 7.29289C1.90237 7.68342 1.90237 8.31658 2.29289 8.70711L11.2929 17.7071C11.6834 18.0976 12.3166 18.0976 12.7071 17.7071L21.7071 8.70711C22.0976 8.31658 22.0976 7.68342 21.7071 7.29289Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/network/torrent/icons/1uparrow.png b/examples/network/torrent/icons/1uparrow.png
deleted file mode 100644
index f044811787..0000000000
--- a/examples/network/torrent/icons/1uparrow.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/1uparrow.svg b/examples/network/torrent/icons/1uparrow.svg
new file mode 100644
index 0000000000..aaed789617
--- /dev/null
+++ b/examples/network/torrent/icons/1uparrow.svg
@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M21.7071 16.7071C21.3166 17.0976 20.6834 17.0976 20.2929 16.7071L12 8.41421L3.70711 16.7071C3.31658 17.0976 2.68342 17.0976 2.29289 16.7071C1.90237 16.3166 1.90237 15.6834 2.29289 15.2929L11.2929 6.29289C11.6834 5.90237 12.3166 5.90237 12.7071 6.29289L21.7071 15.2929C22.0976 15.6834 22.0976 16.3166 21.7071 16.7071Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/network/torrent/icons/about.svg b/examples/network/torrent/icons/about.svg
new file mode 100644
index 0000000000..2772c4fa31
--- /dev/null
+++ b/examples/network/torrent/icons/about.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4ZM12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11.8735 14C11.4243 14 11.0305 13.6404 11.0859 13.1913C11.1218 12.9004 11.1938 12.7598 11.2726 12.6061C11.2846 12.5827 11.2968 12.559 11.309 12.5344C11.4537 12.2427 11.8446 11.8125 12.4814 11.2438C12.742 11.025 12.9591 10.788 13.1328 10.5328C13.3065 10.2776 13.3933 10.0042 13.3933 9.7125C13.3933 9.40625 13.2775 9.12552 13.0459 8.87031C12.8143 8.6151 12.467 8.4875 12.0038 8.4875C11.4827 8.4875 11.0955 8.64062 10.8422 8.94687C10.7885 9.0118 10.7473 9.09933 10.7158 9.19697C10.5687 9.65217 10.2209 10.0625 9.74577 10.0625C9.26613 10.0625 8.88562 9.66512 9.03161 9.20479C9.18688 8.71516 9.47937 8.13493 9.99543 7.65625C10.5093 7.21875 11.1787 7 12.0038 7C12.8143 7 13.5164 7.21875 14.1098 7.65625C14.7033 8.09375 15 8.72083 15 9.5375C15 10.0188 14.8914 10.4307 14.6743 10.7734C14.4572 11.1161 14.1605 11.4771 13.7841 11.8562C13.2775 12.3375 12.9699 12.7167 12.8614 12.9938C12.834 13.0635 12.8088 13.1315 12.7863 13.2017C12.65 13.6271 12.3172 14 11.8735 14ZM12 15C12.5523 15 13 15.4477 13 16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16C11 15.4477 11.4477 15 12 15Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/network/torrent/icons/bottom.png b/examples/network/torrent/icons/bottom.png
deleted file mode 100644
index fe66b5d028..0000000000
--- a/examples/network/torrent/icons/bottom.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/bottom.svg b/examples/network/torrent/icons/bottom.svg
new file mode 100644
index 0000000000..44395cde25
--- /dev/null
+++ b/examples/network/torrent/icons/bottom.svg
@@ -0,0 +1,6 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="File /download_arrow_down">
+<path id="Layer01" fill-rule="evenodd" clip-rule="evenodd" d="M3 21C3 20.4477 3.44772 20 4 20H20C20.5523 20 21 20.4477 21 21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21Z" fill="#0D0D0D"/>
+<path id="Layer02" fill-rule="evenodd" clip-rule="evenodd" d="M12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L7.93679 13.351C7.54626 12.9605 7.54626 12.3273 7.93679 11.9368C8.32731 11.5463 8.96047 11.5463 9.351 11.9368L11 13.5858L11 3.27208C11 2.71979 11.4477 2.27208 12 2.27208C12.5523 2.27208 13 2.71979 13 3.27208L13 13.5858L14.649 11.9368C15.0395 11.5463 15.6727 11.5463 16.0632 11.9368C16.4537 12.3273 16.4537 12.9605 16.0632 13.351L12.7071 16.7071Z" fill="#0D0D0D"/>
+</g>
+</svg>
diff --git a/examples/network/torrent/icons/edit_add.png b/examples/network/torrent/icons/edit_add.png
deleted file mode 100644
index 85b022e7a4..0000000000
--- a/examples/network/torrent/icons/edit_add.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/edit_add.svg b/examples/network/torrent/icons/edit_add.svg
new file mode 100644
index 0000000000..ec817193f5
--- /dev/null
+++ b/examples/network/torrent/icons/edit_add.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11 17L11 7.00003L13 7.00003L13 17L11 17Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M7 11L17 11L17 13L7 13L7 11Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/network/torrent/icons/edit_remove.png b/examples/network/torrent/icons/edit_remove.png
deleted file mode 100644
index 93361f5225..0000000000
--- a/examples/network/torrent/icons/edit_remove.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/edit_remove.svg b/examples/network/torrent/icons/edit_remove.svg
new file mode 100644
index 0000000000..ec18b7da64
--- /dev/null
+++ b/examples/network/torrent/icons/edit_remove.svg
@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7 13V11H17V13H7Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/network/torrent/icons/exit.png b/examples/network/torrent/icons/exit.png
deleted file mode 100644
index 2f7ff43a71..0000000000
--- a/examples/network/torrent/icons/exit.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/exit.svg b/examples/network/torrent/icons/exit.svg
new file mode 100644
index 0000000000..94f5245c52
--- /dev/null
+++ b/examples/network/torrent/icons/exit.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4ZM12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.4644 15.5355C8.07388 15.145 8.07388 14.5118 8.4644 14.1213L10.5857 12L8.46444 9.87868C8.07392 9.48815 8.07392 8.85499 8.46444 8.46446C8.85496 8.07394 9.48813 8.07394 9.87865 8.46446L12 10.5858L14.1213 8.46446C14.5118 8.07394 15.1449 8.07394 15.5355 8.46446C15.926 8.85499 15.926 9.48815 15.5355 9.87868L13.4142 12L15.5355 14.1213C15.926 14.5118 15.926 15.145 15.5355 15.5355C15.145 15.9261 14.5118 15.9261 14.1213 15.5355L12 13.4142L9.87862 15.5355C9.48809 15.9261 8.85493 15.9261 8.4644 15.5355Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/network/torrent/icons/peertopeer.png b/examples/network/torrent/icons/peertopeer.png
deleted file mode 100644
index f4856dcec5..0000000000
--- a/examples/network/torrent/icons/peertopeer.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/peertopeer.svg b/examples/network/torrent/icons/peertopeer.svg
new file mode 100644
index 0000000000..9498804cb8
--- /dev/null
+++ b/examples/network/torrent/icons/peertopeer.svg
@@ -0,0 +1,62 @@
+<svg width="128" height="128" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="App Icon-Apple-1">
+<rect id="App Icon Bg" x="62" y="62" width="900" height="900" rx="180" fill="url(#paint0_linear_1432_187)"/>
+<g id="torrent client">
+<g id="laptop_mac">
+<mask id="mask0_1432_187" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="122" y="344" width="176" height="176">
+<rect id="Bounding box" x="122" y="344" width="176" height="176" fill="#D9D9D9"/>
+</mask>
+<g mask="url(#mask0_1432_187)">
+<path id="laptop_mac_2" d="M136.667 490.667C132.633 490.667 129.181 489.231 126.308 486.358C123.436 483.486 122 480.033 122 476H151.333C147.3 476 143.847 474.564 140.975 471.692C138.103 468.819 136.667 465.367 136.667 461.333V380.667C136.667 376.633 138.103 373.181 140.975 370.308C143.847 367.436 147.3 366 151.333 366H268.667C272.7 366 276.153 367.436 279.025 370.308C281.897 373.181 283.333 376.633 283.333 380.667V461.333C283.333 465.367 281.897 468.819 279.025 471.692C276.153 474.564 272.7 476 268.667 476H298C298 480.033 296.564 483.486 293.692 486.358C290.819 489.231 287.367 490.667 283.333 490.667H136.667ZM210 483.333C212.078 483.333 213.819 482.631 215.225 481.225C216.631 479.819 217.333 478.078 217.333 476C217.333 473.922 216.631 472.181 215.225 470.775C213.819 469.369 212.078 468.667 210 468.667C207.922 468.667 206.181 469.369 204.775 470.775C203.369 472.181 202.667 473.922 202.667 476C202.667 478.078 203.369 479.819 204.775 481.225C206.181 482.631 207.922 483.333 210 483.333ZM151.333 461.333H268.667V380.667H151.333V461.333Z" fill="white"/>
+</g>
+</g>
+<g id="laptop_mac_3">
+<mask id="mask1_1432_187" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="726" y="344" width="176" height="176">
+<rect id="Bounding box_2" x="726" y="344" width="176" height="176" fill="#D9D9D9"/>
+</mask>
+<g mask="url(#mask1_1432_187)">
+<path id="laptop_mac_4" d="M740.667 490.667C736.633 490.667 733.181 489.231 730.308 486.358C727.436 483.486 726 480.033 726 476H755.333C751.3 476 747.847 474.564 744.975 471.692C742.103 468.819 740.667 465.367 740.667 461.333V380.667C740.667 376.633 742.103 373.181 744.975 370.308C747.847 367.436 751.3 366 755.333 366H872.667C876.7 366 880.153 367.436 883.025 370.308C885.897 373.181 887.333 376.633 887.333 380.667V461.333C887.333 465.367 885.897 468.819 883.025 471.692C880.153 474.564 876.7 476 872.667 476H902C902 480.033 900.564 483.486 897.692 486.358C894.819 489.231 891.367 490.667 887.333 490.667H740.667ZM814 483.333C816.078 483.333 817.819 482.631 819.225 481.225C820.631 479.819 821.333 478.078 821.333 476C821.333 473.922 820.631 472.181 819.225 470.775C817.819 469.369 816.078 468.667 814 468.667C811.922 468.667 810.181 469.369 808.775 470.775C807.369 472.181 806.667 473.922 806.667 476C806.667 478.078 807.369 479.819 808.775 481.225C810.181 482.631 811.922 483.333 814 483.333ZM755.333 461.333H872.667V380.667H755.333V461.333Z" fill="white"/>
+</g>
+</g>
+<g id="laptop_mac_5">
+<mask id="mask2_1432_187" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="248" y="682" width="176" height="176">
+<rect id="Bounding box_3" x="248" y="682" width="176" height="176" fill="#D9D9D9"/>
+</mask>
+<g mask="url(#mask2_1432_187)">
+<path id="laptop_mac_6" d="M262.667 828.667C258.633 828.667 255.181 827.231 252.308 824.358C249.436 821.486 248 818.033 248 814H277.333C273.3 814 269.847 812.564 266.975 809.692C264.103 806.819 262.667 803.367 262.667 799.333V718.667C262.667 714.633 264.103 711.181 266.975 708.308C269.847 705.436 273.3 704 277.333 704H394.667C398.7 704 402.153 705.436 405.025 708.308C407.897 711.181 409.333 714.633 409.333 718.667V799.333C409.333 803.367 407.897 806.819 405.025 809.692C402.153 812.564 398.7 814 394.667 814H424C424 818.033 422.564 821.486 419.692 824.358C416.819 827.231 413.367 828.667 409.333 828.667H262.667ZM336 821.333C338.078 821.333 339.819 820.631 341.225 819.225C342.631 817.819 343.333 816.078 343.333 814C343.333 811.922 342.631 810.181 341.225 808.775C339.819 807.369 338.078 806.667 336 806.667C333.922 806.667 332.181 807.369 330.775 808.775C329.369 810.181 328.667 811.922 328.667 814C328.667 816.078 329.369 817.819 330.775 819.225C332.181 820.631 333.922 821.333 336 821.333ZM277.333 799.333H394.667V718.667H277.333V799.333Z" fill="white"/>
+</g>
+</g>
+<g id="laptop_mac_7">
+<mask id="mask3_1432_187" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="600" y="682" width="176" height="176">
+<rect id="Bounding box_4" x="600" y="682" width="176" height="176" fill="#D9D9D9"/>
+</mask>
+<g mask="url(#mask3_1432_187)">
+<path id="laptop_mac_8" d="M614.667 828.667C610.633 828.667 607.181 827.231 604.308 824.358C601.436 821.486 600 818.033 600 814H629.333C625.3 814 621.847 812.564 618.975 809.692C616.103 806.819 614.667 803.367 614.667 799.333V718.667C614.667 714.633 616.103 711.181 618.975 708.308C621.847 705.436 625.3 704 629.333 704H746.667C750.7 704 754.153 705.436 757.025 708.308C759.897 711.181 761.333 714.633 761.333 718.667V799.333C761.333 803.367 759.897 806.819 757.025 809.692C754.153 812.564 750.7 814 746.667 814H776C776 818.033 774.564 821.486 771.692 824.358C768.819 827.231 765.367 828.667 761.333 828.667H614.667ZM688 821.333C690.078 821.333 691.819 820.631 693.225 819.225C694.631 817.819 695.333 816.078 695.333 814C695.333 811.922 694.631 810.181 693.225 808.775C691.819 807.369 690.078 806.667 688 806.667C685.922 806.667 684.181 807.369 682.775 808.775C681.369 810.181 680.667 811.922 680.667 814C680.667 816.078 681.369 817.819 682.775 819.225C684.181 820.631 685.922 821.333 688 821.333ZM629.333 799.333H746.667V718.667H629.333V799.333Z" fill="white"/>
+</g>
+</g>
+<g id="laptop_mac_9">
+<mask id="mask4_1432_187" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="424" y="130" width="176" height="176">
+<rect id="Bounding box_5" x="424" y="130" width="176" height="176" fill="#D9D9D9"/>
+</mask>
+<g mask="url(#mask4_1432_187)">
+<path id="laptop_mac_10" d="M438.667 276.667C434.633 276.667 431.181 275.231 428.308 272.358C425.436 269.486 424 266.033 424 262H453.333C449.3 262 445.847 260.564 442.975 257.692C440.103 254.819 438.667 251.367 438.667 247.333V166.667C438.667 162.633 440.103 159.181 442.975 156.308C445.847 153.436 449.3 152 453.333 152H570.667C574.7 152 578.153 153.436 581.025 156.308C583.897 159.181 585.333 162.633 585.333 166.667V247.333C585.333 251.367 583.897 254.819 581.025 257.692C578.153 260.564 574.7 262 570.667 262H600C600 266.033 598.564 269.486 595.692 272.358C592.819 275.231 589.367 276.667 585.333 276.667H438.667ZM512 269.333C514.078 269.333 515.819 268.631 517.225 267.225C518.631 265.819 519.333 264.078 519.333 262C519.333 259.922 518.631 258.181 517.225 256.775C515.819 255.369 514.078 254.667 512 254.667C509.922 254.667 508.181 255.369 506.775 256.775C505.369 258.181 504.667 259.922 504.667 262C504.667 264.078 505.369 265.819 506.775 267.225C508.181 268.631 509.922 269.333 512 269.333ZM453.333 247.333H570.667V166.667H453.333V247.333Z" fill="white"/>
+</g>
+</g>
+<path id="netweork-big" fill-rule="evenodd" clip-rule="evenodd" d="M268.007 342C302.498 294.803 350.351 257.989 406 237.126V264.006C364.55 281.188 328.176 308.144 299.754 342H268.007ZM724.246 342C695.824 308.144 659.45 281.188 618 264.006V237.126C673.649 257.989 721.502 294.803 755.993 342H724.246ZM789 520C789 576.131 772.304 628.363 743.608 672H773.017C799.072 627.355 814 575.421 814 520H789ZM512 797C534.744 797 556.848 794.259 578 789.089V814.766C556.757 819.502 534.67 822 512 822C489.33 822 467.243 819.502 446 814.766V789.089C467.152 794.259 489.256 797 512 797ZM280.392 672C251.696 628.363 235 576.131 235 520H210C210 575.421 224.928 627.355 250.983 672H280.392Z" fill="white"/>
+<g id="network">
+<path id="Vector 6" d="M512.222 357.923L602.289 630.013C602.596 630.939 601.531 631.711 600.746 631.132L369.446 460.491C368.67 459.918 369.075 458.686 370.04 458.686H653.981C654.944 458.686 655.35 459.914 654.578 460.489L425.204 631.145C424.425 631.725 423.36 630.965 423.655 630.04L510.319 357.934C510.613 357.011 511.917 357.004 512.222 357.923Z" stroke="white" stroke-width="10"/>
+<circle id="Ellipse 3" cx="512" cy="355" r="22" fill="white"/>
+<circle id="Ellipse 4" cx="366" cy="461" r="22" fill="white"/>
+<circle id="Ellipse 5" cx="658" cy="461" r="22" fill="white"/>
+<circle id="Ellipse 6" cx="423" cy="633" r="22" fill="white"/>
+<circle id="Ellipse 7" cx="600" cy="633" r="22" fill="white"/>
+</g>
+</g>
+</g>
+<defs>
+<linearGradient id="paint0_linear_1432_187" x1="131.231" y1="96.0541" x2="967.084" y2="893.654" gradientUnits="userSpaceOnUse">
+<stop stop-color="#00414A"/>
+<stop offset="1" stop-color="#0C1C1F"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/examples/network/torrent/icons/player_pause.png b/examples/network/torrent/icons/player_pause.png
deleted file mode 100644
index 8c9bcc4556..0000000000
--- a/examples/network/torrent/icons/player_pause.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/player_pause.svg b/examples/network/torrent/icons/player_pause.svg
new file mode 100644
index 0000000000..6499480ea4
--- /dev/null
+++ b/examples/network/torrent/icons/player_pause.svg
@@ -0,0 +1,6 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="Player / pause-symbol">
+<path id="Layer01" fill-rule="evenodd" clip-rule="evenodd" d="M8 7C8 6.44772 8.33579 6 8.75 6H10.25C10.6642 6 11 6.44772 11 7V17C11 17.5523 10.6642 18 10.25 18H8.75C8.33579 18 8 17.5523 8 17V7Z" fill="#0D0D0D"/>
+<path id="Layer02" fill-rule="evenodd" clip-rule="evenodd" d="M13 7C13 6.44772 13.3358 6 13.75 6H15.25C15.6642 6 16 6.44772 16 7V17C16 17.5523 15.6642 18 15.25 18H13.75C13.3358 18 13 17.5523 13 17V7Z" fill="#0D0D0D"/>
+</g>
+</svg>
diff --git a/examples/network/torrent/icons/player_play.png b/examples/network/torrent/icons/player_play.png
deleted file mode 100644
index 70daa339be..0000000000
--- a/examples/network/torrent/icons/player_play.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/player_play.svg b/examples/network/torrent/icons/player_play.svg
new file mode 100644
index 0000000000..a8cce6f422
--- /dev/null
+++ b/examples/network/torrent/icons/player_play.svg
@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M17.8182 12L7.89091 6.14985L7.89091 17.8501L17.8182 12ZM19.2 13.4143C20.2667 12.7857 20.2667 11.2143 19.2 10.5857L8.4 4.22123C7.33333 3.59264 6 4.37838 6 5.63555L6 18.3644C6 19.6216 7.33333 20.4074 8.4 19.7788L19.2 13.4143Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/network/torrent/icons/player_stop.png b/examples/network/torrent/icons/player_stop.png
deleted file mode 100644
index ce6585ae84..0000000000
--- a/examples/network/torrent/icons/player_stop.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/icons/player_stop.svg b/examples/network/torrent/icons/player_stop.svg
new file mode 100644
index 0000000000..e220f5a790
--- /dev/null
+++ b/examples/network/torrent/icons/player_stop.svg
@@ -0,0 +1,5 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="Player / stop-symbol">
+<path id="Layer01" fill-rule="evenodd" clip-rule="evenodd" d="M17 7H7L7 17H17V7ZM7 5C5.89543 5 5 5.89543 5 7V17C5 18.1046 5.89543 19 7 19H17C18.1046 19 19 18.1046 19 17V7C19 5.89543 18.1046 5 17 5H7Z" fill="#0D0D0D"/>
+</g>
+</svg>
diff --git a/examples/network/torrent/icons/stop.png b/examples/network/torrent/icons/stop.png
deleted file mode 100644
index 52e593ab21..0000000000
--- a/examples/network/torrent/icons/stop.png
+++ /dev/null
Binary files differ
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 2b5d0a8757..9bda5bb05e 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -80,19 +80,19 @@ MainWindow::MainWindow(QWidget *parent)
setCentralWidget(torrentView);
// Set header resize modes and initial section sizes
- QFontMetrics fm = fontMetrics();
+ const QFontMetrics fm = torrentView->fontMetrics();
QHeaderView *header = torrentView->header();
header->resizeSection(0, fm.horizontalAdvance("typical-name-for-a-torrent.torrent"));
- header->resizeSection(1, fm.horizontalAdvance(headers.at(1) + " "));
- header->resizeSection(2, fm.horizontalAdvance(headers.at(2) + " "));
- header->resizeSection(3, qMax(fm.horizontalAdvance(headers.at(3) + " "), fm.horizontalAdvance(" 1234.0 KB/s ")));
- header->resizeSection(4, qMax(fm.horizontalAdvance(headers.at(4) + " "), fm.horizontalAdvance(" 1234.0 KB/s ")));
- header->resizeSection(5, qMax(fm.horizontalAdvance(headers.at(5) + " "), fm.horizontalAdvance(tr("Downloading") + " ")));
+ header->resizeSection(1, fm.horizontalAdvance(headers.at(1) + " "));
+ header->resizeSection(2, fm.horizontalAdvance(headers.at(2) + " "));
+ header->resizeSection(3, qMax(fm.horizontalAdvance(headers.at(3) + " "), fm.horizontalAdvance(" 1234.0 KB/s ")));
+ header->resizeSection(4, qMax(fm.horizontalAdvance(headers.at(4) + " "), fm.horizontalAdvance(" 1234.0 KB/s ")));
+ header->resizeSection(5, qMax(fm.horizontalAdvance(headers.at(5) + " "), fm.horizontalAdvance(tr("Downloading") + " ")));
// Create common actions
- QAction *newTorrentAction = new QAction(QIcon(":/icons/bottom.png"), tr("Add &new torrent"), this);
- pauseTorrentAction = new QAction(QIcon(":/icons/player_pause.png"), tr("&Pause torrent"), this);
- removeTorrentAction = new QAction(QIcon(":/icons/player_stop.png"), tr("&Remove torrent"), this);
+ QAction *newTorrentAction = new QAction(QIcon(":/icons/bottom.svg"), tr("Add &new torrent"), this);
+ pauseTorrentAction = new QAction(QIcon(":/icons/player_pause.svg"), tr("&Pause torrent"), this);
+ removeTorrentAction = new QAction(QIcon(":/icons/player_stop.svg"), tr("&Remove torrent"), this);
// File menu
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
@@ -100,12 +100,12 @@ MainWindow::MainWindow(QWidget *parent)
fileMenu->addAction(pauseTorrentAction);
fileMenu->addAction(removeTorrentAction);
fileMenu->addSeparator();
- fileMenu->addAction(QIcon(":/icons/exit.png"), tr("E&xit"), this, &MainWindow::close);
+ fileMenu->addAction(QIcon(":/icons/exit.svg"), tr("E&xit"), this, &MainWindow::close);
// Help menu
QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
- helpMenu->addAction(tr("&About"), this, &MainWindow::about);
- helpMenu->addAction(tr("About &Qt"), qApp, QApplication::aboutQt);
+ helpMenu->addAction(QIcon(":/icons/about.svg"), tr("&About"), this, &MainWindow::about);
+ helpMenu->addAction(QIcon(":/icons/about.svg"), tr("About &Qt"), qApp, QApplication::aboutQt);
// Top toolbar
QToolBar *topBar = new QToolBar(tr("Tools"));
@@ -115,8 +115,8 @@ MainWindow::MainWindow(QWidget *parent)
topBar->addAction(removeTorrentAction);
topBar->addAction(pauseTorrentAction);
topBar->addSeparator();
- downActionTool = topBar->addAction(QIcon(tr(":/icons/1downarrow.png")), tr("Move down"));
- upActionTool = topBar->addAction(QIcon(tr(":/icons/1uparrow.png")), tr("Move up"));
+ downActionTool = topBar->addAction(QIcon(tr(":/icons/1downarrow.svg")), tr("Move down"));
+ upActionTool = topBar->addAction(QIcon(tr(":/icons/1uparrow.svg")), tr("Move up"));
// Bottom toolbar
QToolBar *bottomBar = new QToolBar(tr("Rate control"));
@@ -462,10 +462,10 @@ void MainWindow::setActionsEnabled()
pauseTorrentAction->setEnabled(item && pauseEnabled);
if (client && client->state() == TorrentClient::Paused) {
- pauseTorrentAction->setIcon(QIcon(":/icons/player_play.png"));
+ pauseTorrentAction->setIcon(QIcon(":/icons/player_play.svg"));
pauseTorrentAction->setText(tr("Resume torrent"));
} else {
- pauseTorrentAction->setIcon(QIcon(":/icons/player_pause.png"));
+ pauseTorrentAction->setIcon(QIcon(":/icons/player_pause.svg"));
pauseTorrentAction->setText(tr("Pause torrent"));
}
@@ -575,7 +575,10 @@ void MainWindow::setDownloadLimit(int value)
void MainWindow::about()
{
QLabel *icon = new QLabel;
- icon->setPixmap(QPixmap(":/icons/peertopeer.png"));
+ QImage img(":/icons/peertopeer.svg");
+ QPixmap pm;
+ pm.convertFromImage(img);
+ icon->setPixmap(pm);
QLabel *text = new QLabel;
text->setWordWrap(true);