From 4ebe51fb0598df390b4a3c19c92e6dec5e43b9d2 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 14 Sep 2022 23:32:03 +0200 Subject: [PATCH] More icons as SVG; small fixes to image landmark editor. --- src/icons/icons.qrc | 3 +- src/icons/images/move_simple.png | Bin 258 -> 0 bytes src/icons/images/move_simple_16px.png | Bin 0 -> 308 bytes src/icons/images/move_simple_16px@2x.png | Bin 0 -> 661 bytes src/icons/svg/move_simple_16px.svg | 87 +++++++++++++++++++++++ src/img/img/ImageLandmarksDialog.ui | 2 +- src/img/img/imgLandmarksDialog.cc | 9 +-- 7 files changed, 95 insertions(+), 6 deletions(-) delete mode 100644 src/icons/images/move_simple.png create mode 100644 src/icons/images/move_simple_16px.png create mode 100644 src/icons/images/move_simple_16px@2x.png create mode 100644 src/icons/svg/move_simple_16px.svg diff --git a/src/icons/icons.qrc b/src/icons/icons.qrc index 86622eda1..b9668b18b 100644 --- a/src/icons/icons.qrc +++ b/src/icons/icons.qrc @@ -114,7 +114,8 @@ images/m90_24px.png images/m90_24px@2x.png images/move.png - images/move_simple.png + images/move_simple_16px.png + images/move_simple_16px@2x.png images/neutral_12px.png images/neutral_12px@2x.png images/new_folder_16px.png diff --git a/src/icons/images/move_simple.png b/src/icons/images/move_simple.png deleted file mode 100644 index f810ae03381ac3e51d3c88100495bb5187617c26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 258 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>EL74F^`vD!GAbW|YuPgg)R#AQwc6hbmm72G|21Ky{o<^dH(db&7anMprB-l zYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt%^VT^vI!diPFt9iB-q)4s7N3EbXRyXNywH$6v=L>8+BXYREM9J|XhDPz_%RuzSr zH#fXyd##sdwx&D%jCkWrUWezU(L(2Dm^w~n)oy&!InC8qQn=A;lHa+{8MBsk3tLy; zIL{He<*eYe8TY$)7;avD^1hfRQ(^YRy3aHFZb;85GB_&qy)^^q83s>RKbLh*2~7Zb Cw0a}} literal 0 HcmV?d00001 diff --git a/src/icons/images/move_simple_16px@2x.png b/src/icons/images/move_simple_16px@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e75cd0d7a06fa0bb16fcbba9d3016cb43f8d3508 GIT binary patch literal 661 zcmV;G0&4wdR82TRqsrx%hhYnedz1WKd z9y$iPcx#~!Zm0Ga1nkoxvU#!P_(>*|(jIuAC%t>_(R`bSCMcqytH3Ns@dCiS_aT z-VTJqIXCI|`yYWl;1Tc`*z0z?7fF(QEy`C&fR}s@bj)mOW>cU8%*%)bw^R}dRXnp66Jf5vS;GDbiN^Rclb}trhQ3Rnp%WpyE z=f^;e8-C-mCcotu9?uLI1DA{M$Qm+ht$OpCr1Q|@@V5OtE71i{ zRnoy~zM@97)nr!8YAb?|ph&4jQS^N{9DX3+2>cyr0Y`BhzhOs{xx=hlz!7=9gI|VG z6ipX%=iG#nWthjaT891+v;oZQErc0JnKhE$WqI1S78Yqp*ukuJZb-7Xnyi{knP#Mv zfE<%4-Ha3#kkb*3&1}4jh`+ugI+S$CAL@u^z%Sq@Fe}@X_&)FgSpQ+zjL&A)%VHC5 v94-{gzoX?2nAs;_RDk4i!*y`-{{Z+6Y8?B{Pj15V00000NkvXXu0mjfF@`OY literal 0 HcmV?d00001 diff --git a/src/icons/svg/move_simple_16px.svg b/src/icons/svg/move_simple_16px.svg new file mode 100644 index 000000000..a97b8302a --- /dev/null +++ b/src/icons/svg/move_simple_16px.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/img/img/ImageLandmarksDialog.ui b/src/img/img/ImageLandmarksDialog.ui index b6e3bb660..b9d16e493 100644 --- a/src/img/img/ImageLandmarksDialog.ui +++ b/src/img/img/ImageLandmarksDialog.ui @@ -166,7 +166,7 @@ Move - :/move_simple.png + :/move_simple_16px.png true diff --git a/src/img/img/imgLandmarksDialog.cc b/src/img/img/imgLandmarksDialog.cc index 7d4c15ce5..b8755adb9 100644 --- a/src/img/img/imgLandmarksDialog.cc +++ b/src/img/img/imgLandmarksDialog.cc @@ -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::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; }