More icons as SVG; small fixes to image landmark editor.

This commit is contained in:
Matthias Koefferlein 2022-09-14 23:32:03 +02:00
parent c7006898a6
commit 4ebe51fb05
7 changed files with 95 additions and 6 deletions

View File

@ -114,7 +114,8 @@
<file alias="m90_24px.png">images/m90_24px.png</file>
<file alias="m90_24px@2x.png">images/m90_24px@2x.png</file>
<file alias="move.png">images/move.png</file>
<file alias="move_simple.png">images/move_simple.png</file>
<file alias="move_simple_16px.png">images/move_simple_16px.png</file>
<file alias="move_simple_16px@2x.png">images/move_simple_16px@2x.png</file>
<file alias="neutral_12px.png">images/neutral_12px.png</file>
<file alias="neutral_12px@2x.png">images/neutral_12px@2x.png</file>
<file alias="new_folder_16px.png">images/new_folder_16px.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="16"
height="16"
viewBox="0 0 4.2333332 4.2333335"
version="1.1"
id="svg1011"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="move_simple_16px.svg"
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">
<sodipodi:namedview
id="namedview1013"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="px"
showgrid="true"
units="px"
inkscape:snap-nodes="true"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true"
inkscape:snap-others="false"
inkscape:zoom="17.288462"
inkscape:cx="-0.17352614"
inkscape:cy="9.4571744"
inkscape:window-width="1535"
inkscape:window-height="1081"
inkscape:window-x="247"
inkscape:window-y="82"
inkscape:window-maximized="0"
inkscape:current-layer="layer1"
width="16px">
<inkscape:grid
type="xygrid"
id="grid1074"
spacingx="0.13229167"
spacingy="0.13229167"
empspacing="2" />
</sodipodi:namedview>
<defs
id="defs1008">
<linearGradient
id="linearGradient3600">
<stop
style="stop-color:#ff9f3f;stop-opacity:1;"
offset="0"
id="stop3602" />
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
id="stop3604" />
</linearGradient>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.52916667;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:0.5;stroke-miterlimit:4;stroke-dasharray:none"
d="M 0.52916668,0.52916668 V 1.8520834 L 0.92604169,1.4552084 1.5875,2.1166667 0.92604169,2.7781251 0.52916668,2.3812501 V 3.7041668 H 1.8520834 l -0.396875,-0.396875 0.6614583,-0.6614584 0.6614584,0.6614584 -0.396875,0.396875 h 1.3229167 l 0,-1.3229167 -0.396875,0.396875 -0.6614584,-0.6614584 0.6614584,-0.6614583 0.396875,0.396875 0,-1.32291672 H 2.3812501 L 2.7781251,0.92604169 2.1166667,1.5875 1.4552084,0.92604169 1.8520834,0.52916668 Z"
id="path5020"
sodipodi:nodetypes="ccccccccccccccccccccccccc" />
<rect
style="fill:none;stroke:#865b26;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect3596"
width="4.2333326"
height="4.2333331"
x="3.3333333e-07"
y="3.3333333e-07"
inkscape:export-filename="/home/matthias/klayout/master/src/lay/lay/images/back.png"
inkscape:export-xdpi="27.093315"
inkscape:export-ydpi="27.093315" />
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 0.52916668,0.52916668 V 1.8520834 L 0.92604169,1.4552084 1.5875,2.1166667 0.92604169,2.7781251 0.52916668,2.3812501 V 3.7041668 H 1.8520834 l -0.396875,-0.396875 0.6614583,-0.6614584 0.6614584,0.6614584 -0.396875,0.396875 h 1.3229167 l 0,-1.3229167 -0.396875,0.396875 -0.6614584,-0.6614584 0.6614584,-0.6614583 0.396875,0.396875 0,-1.32291672 H 2.3812501 L 2.7781251,0.92604169 2.1166667,1.5875 1.4552084,0.92604169 1.8520834,0.52916668 Z"
id="path878"
sodipodi:nodetypes="ccccccccccccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -166,7 +166,7 @@
<string>Move</string>
</property>
<property name="icon" >
<iconset resource="layResources.qrc" >:/move_simple.png</iconset>
<iconset resource="layResources.qrc" >:/move_simple_16px.png</iconset>
</property>
<property name="checkable" >
<bool>true</bool>

View File

@ -238,6 +238,7 @@ public:
double l = double (search_range) / ui ()->mouse_event_trans ().mag ();
db::DBox search_box = db::DBox (p, p).enlarged (db::DVector (l, l));
m_selected = -1;
int li = 0;
for (std::vector<db::DPoint>::const_iterator l = mp_image->landmarks ().begin (); l != mp_image->landmarks ().end (); ++l, ++li) {
if (search_box.contains (*l)) {
@ -419,7 +420,7 @@ LandmarksDialog::LandmarksDialog (QWidget *parent, img::Object &img)
mp_service->updated_event.add (this, &LandmarksDialog::landmarks_updated);
new_pb->setChecked (true);
update_mode ();
mp_service->set_mode (Add);
landmarks_updated ();
}
@ -436,11 +437,11 @@ LandmarksDialog::update_mode ()
{
mode_t new_mode = None;
if (new_pb->isChecked ()) {
if (sender () == new_pb) {
new_mode = Add;
} else if (move_pb->isChecked ()) {
} else if (sender () == move_pb) {
new_mode = Move;
} else if (delete_pb->isChecked ()) {
} else if (sender () == delete_pb) {
new_mode = Delete;
}