diff --git a/src/Mod/Sketcher/Gui/Command.cpp b/src/Mod/Sketcher/Gui/Command.cpp index 6cfee9d22d..082e69ad46 100644 --- a/src/Mod/Sketcher/Gui/Command.cpp +++ b/src/Mod/Sketcher/Gui/Command.cpp @@ -1296,10 +1296,6 @@ protected: bool isActive() override; Gui::Action* createAction() override; -private: - void updateIcon(bool value); - void updateInactiveHandlerIcon(); - public: CmdSketcherGrid(const CmdSketcherGrid&) = delete; CmdSketcherGrid(CmdSketcherGrid&&) = delete; @@ -1320,26 +1316,6 @@ CmdSketcherGrid::CmdSketcherGrid() eType = 0; } -void CmdSketcherGrid::updateIcon(bool value) -{ - static QIcon active = Gui::BitmapFactory().iconFromTheme("Sketcher_GridToggle"); - static QIcon inactive = Gui::BitmapFactory().iconFromTheme("Sketcher_GridToggle_Deactivated"); - - auto* pcAction = qobject_cast(getAction()); - pcAction->setIcon(value ? active : inactive); -} - -void CmdSketcherGrid::updateInactiveHandlerIcon() -{ - auto* vp = getInactiveHandlerEditModeSketchViewProvider(); - - if (vp) { - auto value = vp->ShowGrid.getValue(); - - updateIcon(value); - } -} - void CmdSketcherGrid::activated(int iMsg) { Q_UNUSED(iMsg); @@ -1351,8 +1327,6 @@ void CmdSketcherGrid::activated(int iMsg) auto value = sketchView->ShowGrid.getValue(); sketchView->ShowGrid.setValue(!value); - - updateIcon(!value); } Gui::Action* CmdSketcherGrid::createAction() @@ -1372,9 +1346,6 @@ Gui::Action* CmdSketcherGrid::createAction() gsa->updateWidget(); }); - // set the right pixmap - updateInactiveHandlerIcon(); - return pcAction; } @@ -1397,10 +1368,6 @@ bool CmdSketcherGrid::isActive() auto* vp = getInactiveHandlerEditModeSketchViewProvider(); if (vp) { - auto value = vp->ShowGrid.getValue(); - - updateIcon(value); - return true; } @@ -1527,8 +1494,6 @@ protected: Gui::Action* createAction() override; private: - void updateIcon(bool value); - ParameterGrp::handle getParameterPath() { return App::GetApplication().GetParameterGroupByPath( @@ -1570,24 +1535,12 @@ void CmdSketcherSnap::OnChange(Base::Subject& rCaller, const char* } } -void CmdSketcherSnap::updateIcon(bool value) -{ - static QIcon active = Gui::BitmapFactory().iconFromTheme("Sketcher_Snap"); - static QIcon inactive = Gui::BitmapFactory().iconFromTheme("Sketcher_Snap_Deactivated"); - - auto* pcAction = qobject_cast(getAction()); - pcAction->setIcon(value ? active : inactive); -} - void CmdSketcherSnap::activated(int iMsg) { Q_UNUSED(iMsg); getParameterPath()->SetBool("Snap", !snapEnabled); - // snapEnable updated via observer - updateIcon(snapEnabled); - // Update the widget : if (!_pcAction) return; @@ -1616,9 +1569,6 @@ Gui::Action* CmdSketcherSnap::createAction() ssa->updateWidget(snapEnabled); }); - // set the right pixmap - updateIcon(snapEnabled); - return pcAction; } @@ -1641,8 +1591,6 @@ bool CmdSketcherSnap::isActive() auto* vp = getInactiveHandlerEditModeSketchViewProvider(); if (vp) { - updateIcon(snapEnabled); - return true; } @@ -1788,8 +1736,6 @@ protected: Gui::Action* createAction() override; private: - void updateIcon(); - ParameterGrp::handle getParameterPath() { return App::GetApplication().GetParameterGroupByPath( @@ -1829,28 +1775,6 @@ void CmdRenderingOrder::OnChange(Base::Subject& rCaller, const char if (strcmp(sReason, "TopRenderGeometryId") == 0) { TopElement = static_cast(getParameterPath()->GetInt("TopRenderGeometryId", 1)); - - updateIcon(); - } -} - -void CmdRenderingOrder::updateIcon() -{ - static QIcon normal = Gui::BitmapFactory().iconFromTheme("Sketcher_RenderingOrder_Normal"); - static QIcon construction = - Gui::BitmapFactory().iconFromTheme("Sketcher_RenderingOrder_Construction"); - static QIcon external = Gui::BitmapFactory().iconFromTheme("Sketcher_RenderingOrder_External"); - - if (auto* pcAction = qobject_cast(getAction())) { - if (TopElement == ElementType::Normal) { - pcAction->setIcon(normal); - } - else if (TopElement == ElementType::Construction) { - pcAction->setIcon(construction); - } - else if (TopElement == ElementType::External) { - pcAction->setIcon(external); - } } } @@ -1876,9 +1800,6 @@ Gui::Action* CmdRenderingOrder::createAction() roa->updateWidget(); }); - // set the right pixmap - updateIcon(); - return pcAction; } diff --git a/src/Mod/Sketcher/Gui/Resources/Sketcher.qrc b/src/Mod/Sketcher/Gui/Resources/Sketcher.qrc index f20664b78a..8a8d79a217 100644 --- a/src/Mod/Sketcher/Gui/Resources/Sketcher.qrc +++ b/src/Mod/Sketcher/Gui/Resources/Sketcher.qrc @@ -110,13 +110,6 @@ icons/general/Sketcher_ValidateSketch.svg icons/general/Sketcher_ViewSection.svg icons/general/Sketcher_ViewSketch.svg - icons/general/Sketcher_GridToggle.svg - icons/general/Sketcher_GridToggle_Deactivated.svg - icons/general/Sketcher_RenderingOrder_Construction.svg - icons/general/Sketcher_RenderingOrder_External.svg - icons/general/Sketcher_RenderingOrder_Normal.svg - icons/general/Sketcher_Snap.svg - icons/general/Sketcher_Snap_Deactivated.svg icons/geometry/Sketcher_AlterFillet.svg diff --git a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_GridToggle.svg b/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_GridToggle.svg deleted file mode 100644 index ba6217c972..0000000000 --- a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_GridToggle.svg +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - [wmayer] - - - 2011-10-10 - https://www.freecad.org/wiki/index.php?title=Artwork - - - FreeCAD - - - FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Section.svg - - - FreeCAD LGPL2+ - - - https://www.gnu.org/copyleft/lesser.html - - - [agryson] Alexander Gryson - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_GridToggle_Deactivated.svg b/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_GridToggle_Deactivated.svg deleted file mode 100644 index df162d2abe..0000000000 --- a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_GridToggle_Deactivated.svg +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - [wmayer] - - - 2011-10-10 - https://www.freecad.org/wiki/index.php?title=Artwork - - - FreeCAD - - - FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Section.svg - - - FreeCAD LGPL2+ - - - https://www.gnu.org/copyleft/lesser.html - - - [agryson] Alexander Gryson - - - - - - - - - - - - - - - - - - - - diff --git a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_Construction.svg b/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_Construction.svg deleted file mode 100644 index d6481992b5..0000000000 --- a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_Construction.svg +++ /dev/null @@ -1,488 +0,0 @@ - - - - Sketcher_ReorientSketch - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Sketcher_ReorientSketch - - - [vocx] - - - Sketcher_MergeSketch - 2020-09-25 - https://www.freecad.org/wiki/index.php?title=Artwork - - - FreeCAD - - - FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_ReorientSketch.svg - - - CC-BY-SA 4.0 - - - https://www.gnu.org/copyleft/lesser.html - - - [agryson] Alexander Gryson - - - A coordinate axis system with three axes (red, blue, green) and three gray planes, next to a red sketch (square and circle). It was created from the 'MergeSketch' and 'Std_CoordinateSystem' icons. - - - - - - - - - - - - - - - - - - diff --git a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_External.svg b/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_External.svg deleted file mode 100644 index 9f766b7d2e..0000000000 --- a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_External.svg +++ /dev/null @@ -1,489 +0,0 @@ - - - - Sketcher_ReorientSketch - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Sketcher_ReorientSketch - - - [vocx] - - - Sketcher_MergeSketch - 2020-09-25 - https://www.freecad.org/wiki/index.php?title=Artwork - - - FreeCAD - - - FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_ReorientSketch.svg - - - CC-BY-SA 4.0 - - - https://www.gnu.org/copyleft/lesser.html - - - [agryson] Alexander Gryson - - - A coordinate axis system with three axes (red, blue, green) and three gray planes, next to a red sketch (square and circle). It was created from the 'MergeSketch' and 'Std_CoordinateSystem' icons. - - - - - - - - - - - - - - - - - - diff --git a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_Normal.svg b/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_Normal.svg deleted file mode 100644 index 1912cc661d..0000000000 --- a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_RenderingOrder_Normal.svg +++ /dev/null @@ -1,488 +0,0 @@ - - - - Sketcher_ReorientSketch - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Sketcher_ReorientSketch - - - [vocx] - - - Sketcher_MergeSketch - 2020-09-25 - https://www.freecad.org/wiki/index.php?title=Artwork - - - FreeCAD - - - FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_ReorientSketch.svg - - - CC-BY-SA 4.0 - - - https://www.gnu.org/copyleft/lesser.html - - - [agryson] Alexander Gryson - - - A coordinate axis system with three axes (red, blue, green) and three gray planes, next to a red sketch (square and circle). It was created from the 'MergeSketch' and 'Std_CoordinateSystem' icons. - - - - - - - - - - - - - - - - - - diff --git a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_Snap.svg b/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_Snap.svg deleted file mode 100644 index d836b8809b..0000000000 --- a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_Snap.svg +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - [wmayer] - - - 2011-10-10 - https://www.freecad.org/wiki/index.php?title=Artwork - - - FreeCAD - - - FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Section.svg - - - FreeCAD LGPL2+ - - - https://www.gnu.org/copyleft/lesser.html - - - [agryson] Alexander Gryson - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_Snap_Deactivated.svg b/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_Snap_Deactivated.svg deleted file mode 100644 index a83956f97b..0000000000 --- a/src/Mod/Sketcher/Gui/Resources/icons/general/Sketcher_Snap_Deactivated.svg +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - [wmayer] - - - 2011-10-10 - https://www.freecad.org/wiki/index.php?title=Artwork - - - FreeCAD - - - FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Section.svg - - - FreeCAD LGPL2+ - - - https://www.gnu.org/copyleft/lesser.html - - - [agryson] Alexander Gryson - - - - - - - - - - - - - - - - - - - - - - - - - - - - -