Qt: Add an "x-reset" icon and use to reset extcap options.

Add an "x-reset" stock icon and use it instead of Qt's SP_BrowserReload
icon to reset extcap options.
This commit is contained in:
Gerald Combs 2022-08-05 11:09:23 -07:00
parent 2e7a61a2c1
commit dc24cdfc4b
8 changed files with 228 additions and 1 deletions

View File

@ -57,6 +57,8 @@
<file>stock_icons/14x14/x-filter-matching-bookmark.active@2x.png</file>
<file>stock_icons/14x14/x-filter-matching-bookmark.selected.png</file>
<file>stock_icons/14x14/x-filter-matching-bookmark.selected@2x.png</file>
<file>stock_icons/14x14/x-reset.template.png</file>
<file>stock_icons/14x14/x-reset.template@2x.png</file>
<file>stock_icons/16x16/edit-find.template.png</file>
<file>stock_icons/16x16/edit-find.template@2x.png</file>
<file>stock_icons/16x16/go-first.png</file>
@ -88,6 +90,8 @@
<file>stock_icons/16x16/x-colorize-packets.png</file>
<file>stock_icons/16x16/x-colorize-packets@2x.png</file>
<file>stock_icons/16x16/x-hide-ro.png</file>
<file>stock_icons/16x16/x-reset.template.png</file>
<file>stock_icons/16x16/x-reset.template@2x.png</file>
<file>stock_icons/16x16/x-resize-columns.png</file>
<file>stock_icons/16x16/x-resize-columns@2x.png</file>
<file>stock_icons/16x16/x-stay-last.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="14"
height="14"
viewBox="0 0 14 14"
id="svg2"
version="1.1"
inkscape:version="1.2 (dc2aeda, 2022-05-15)"
sodipodi:docname="x-reset.template.svg"
inkscape:export-filename="x-reset.template@2x.png"
inkscape:export-xdpi="192"
inkscape:export-ydpi="192"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs4">
<marker
style="overflow:visible"
id="TriangleStart"
refX="0"
refY="0"
orient="auto-start-reverse"
inkscape:stockid="TriangleStart"
markerWidth="2.1296299"
markerHeight="2.4619999"
viewBox="0 0 5.3244081 6.1553851"
inkscape:isstock="true"
inkscape:collect="always"
preserveAspectRatio="xMidYMid">
<path
transform="scale(0.5)"
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
d="M 5.77,0 -2.88,5 V -5 Z"
id="path135" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="45.642857"
inkscape:cx="6.9890454"
inkscape:cy="7"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1401"
inkscape:window-height="817"
inkscape:window-x="432"
inkscape:window-y="154"
inkscape:window-maximized="0"
inkscape:object-nodes="true"
inkscape:showpageshadow="2"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1">
<inkscape:grid
type="xygrid"
id="grid4136"
spacingx="0.5"
spacingy="0.5" />
<sodipodi:guide
position="7,8"
orientation="0,1"
id="guide4140"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1038.3622)">
<path
sodipodi:open="true"
sodipodi:end="4.712389"
sodipodi:start="0"
d="m 11.25019,1045.8223 a 4.2516685,4.0232964 0 0 1 -2.6246251,3.717 4.2516685,4.0232964 0 0 1 -4.6334267,-0.8721 4.2516685,4.0232964 0 0 1 -0.9216458,-4.3846 4.2516685,4.0232964 0 0 1 3.9280294,-2.4836"
sodipodi:ry="4.0232964"
sodipodi:rx="4.2516685"
sodipodi:cy="1045.8223"
sodipodi:cx="6.9985218"
id="path2989"
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:none;marker-mid:none;marker-end:url(#TriangleStart)"
sodipodi:type="arc"
sodipodi:arc-type="arc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="16"
height="16"
viewBox="0 0 16 16"
id="svg2"
version="1.1"
inkscape:version="1.2 (dc2aeda, 2022-05-15)"
sodipodi:docname="x-reset.template.svg"
inkscape:export-filename="x-reset.template@2x.png"
inkscape:export-xdpi="192"
inkscape:export-ydpi="192"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs4">
<marker
style="overflow:visible"
id="TriangleStart"
refX="0"
refY="0"
orient="auto-start-reverse"
inkscape:stockid="TriangleStart"
markerWidth="2.1296299"
markerHeight="2.4619999"
viewBox="0 0 5.3244081 6.1553851"
inkscape:isstock="true"
inkscape:collect="always"
preserveAspectRatio="xMidYMid">
<path
transform="scale(0.5)"
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
d="M 5.77,0 -2.88,5 V -5 Z"
id="path135" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="39.9375"
inkscape:cx="7.9874804"
inkscape:cy="8"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1401"
inkscape:window-height="817"
inkscape:window-x="517"
inkscape:window-y="251"
inkscape:window-maximized="0"
inkscape:object-nodes="true"
inkscape:showpageshadow="2"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1">
<inkscape:grid
type="xygrid"
id="grid4136"
spacingx="0.5"
spacingy="0.5"
originx="0"
originy="0" />
<sodipodi:guide
position="7,10"
orientation="0,1"
id="guide4140"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1038.3622)">
<path
sodipodi:open="true"
sodipodi:end="4.712389"
sodipodi:start="0"
d="m 12.999377,1047.0037 a 5.000586,4.8542328 0 0 1 -3.0869449,4.4847 5.000586,4.8542328 0 0 1 -5.4495897,-1.0523 5.000586,4.8542328 0 0 1 -1.0839907,-5.2901 5.000586,4.8542328 0 0 1 4.619939,-2.9966"
sodipodi:ry="4.8542328"
sodipodi:rx="5.000586"
sodipodi:cy="1047.0037"
sodipodi:cx="7.9987907"
id="path2989"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:none;marker-mid:none;marker-end:url(#TriangleStart)"
sodipodi:type="arc"
sodipodi:arc-type="arc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

View File

@ -48,6 +48,7 @@
#include <ui/preference_utils.h>
#include <ui/qt/main_application.h>
#include <ui/qt/utils/stock_icon.h>
#include <ui/qt/utils/variant_pointer.h>
#include <ui/qt/extcap_argument.h>
@ -59,7 +60,7 @@ ExtcapOptionsDialog::ExtcapOptionsDialog(bool startCaptureOnClose, QWidget *pare
ui(new Ui::ExtcapOptionsDialog),
device_name(""),
device_idx(0),
defaultValueIcon_(QApplication::style()->standardIcon(QStyle::SP_BrowserReload))
defaultValueIcon_(StockIcon("x-reset"))
{
ui->setupUi(this);