Skip to content

Commit

Permalink
Part: move icons to measure subdirectory
Browse files Browse the repository at this point in the history
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
  • Loading branch information
vocx-fc authored and wwmayer committed Oct 12, 2020
1 parent e6dd1df commit 9177eae
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 17 deletions.
1 change: 1 addition & 0 deletions src/Mod/Part/Gui/AppPartGui.cpp
Expand Up @@ -127,6 +127,7 @@ PyMOD_INIT_FUNC(PartGui)

Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/booleans"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/create"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/measure"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/parametric"));
Gui::BitmapFactory().addPath(QString::fromLatin1(":/icons/tools"));

Expand Down
13 changes: 7 additions & 6 deletions src/Mod/Part/Gui/Command.cpp
Expand Up @@ -2337,21 +2337,22 @@ bool CmdMeasureToggleAll::isActive(void)
}

//===========================================================================
// Part_Measure_Toggle_3d
// Part_Measure_Toggle_3D
//===========================================================================

DEF_STD_CMD_A(CmdMeasureToggle3d)

CmdMeasureToggle3d::CmdMeasureToggle3d()
: Command("Part_Measure_Toggle_3d")
: Command("Part_Measure_Toggle_3D")
{
sAppModule = "Part";
sGroup = QT_TR_NOOP("Part");
sMenuText = QT_TR_NOOP("Toggle 3d");
sToolTipText = QT_TR_NOOP("Toggle 3d");
sWhatsThis = "Part_Measure_Toggle_3d";
sMenuText = QT_TR_NOOP("Toggle 3D");
sToolTipText = QT_TR_NOOP("Toggle on and off "
"the dimensions on the 3D view");
sWhatsThis = "Part_Measure_Toggle_3D";
sStatusTip = sToolTipText;
sPixmap = "Part_Measure_Toggle_3d";
sPixmap = "Part_Measure_Toggle_3D";
}

void CmdMeasureToggle3d::activated(int iMsg)
Expand Down
16 changes: 9 additions & 7 deletions src/Mod/Part/Gui/Resources/Part.qrc
Expand Up @@ -30,6 +30,15 @@
<file>icons/create/Part_Torus.svg</file>
<file>icons/create/Part_Tube.svg</file>
</qresource>
<qresource>
<file>icons/measure/Part_Measure_Angular.svg</file>
<file>icons/measure/Part_Measure_Linear.svg</file>
<file>icons/measure/Part_Measure_Refresh.svg</file>
<file>icons/measure/Part_Measure_Step_Active.svg</file>
<file>icons/measure/Part_Measure_Step_Done.svg</file>
<file>icons/measure/Part_Measure_Toggle_3D.svg</file>
<file>icons/measure/Part_Measure_Toggle_Delta.svg</file>
</qresource>
<qresource>
<file>icons/parametric/Part_Box_Parametric.svg</file>
<file>icons/parametric/Part_Circle_Parametric.svg</file>
Expand Down Expand Up @@ -72,13 +81,6 @@
<file>icons/Part_Feature.svg</file>
<file>icons/Part_FeatureImport.svg</file>
<file>icons/Part_Import.svg</file>
<file>icons/Part_Measure_Angular.svg</file>
<file>icons/Part_Measure_Linear.svg</file>
<file>icons/Part_Measure_Refresh.svg</file>
<file>icons/Part_Measure_Step_Active.svg</file>
<file>icons/Part_Measure_Step_Done.svg</file>
<file>icons/Part_Measure_Toggle_3d.svg</file>
<file>icons/Part_Measure_Toggle_Delta.svg</file>
<file>icons/Part_Points_from_Mesh.svg</file>
<file>icons/Part_Refine_Shape.svg</file>
<file>icons/Part_Reverse_Shape.svg</file>
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Part/Gui/TaskDimension.cpp
Expand Up @@ -1457,8 +1457,8 @@ PartGui::DimensionControl::DimensionControl(QWidget* parent): QWidget(parent)
QObject::tr("Reset Dialog"), this);
commandLayout->addWidget(resetButton);

QPushButton *toggle3dButton = new QPushButton(Gui::BitmapFactory().pixmap("Part_Measure_Toggle_3d"),
QObject::tr("Toggle 3d"), this);
QPushButton *toggle3dButton = new QPushButton(Gui::BitmapFactory().pixmap("Part_Measure_Toggle_3D"),
QObject::tr("Toggle 3D"), this);
QObject::connect(toggle3dButton, SIGNAL(clicked(bool)), this, SLOT(toggle3dSlot(bool)));
commandLayout->addWidget(toggle3dButton);

Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Part/Gui/Workbench.cpp
Expand Up @@ -154,7 +154,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "Part_Measure_Refresh"
<< "Part_Measure_Clear_All"
<< "Part_Measure_Toggle_All"
<< "Part_Measure_Toggle_3d"
<< "Part_Measure_Toggle_3D"
<< "Part_Measure_Toggle_Delta";

// leave this for 0.14 until #0000477 is fixed
Expand Down Expand Up @@ -223,7 +223,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
<< "Part_Measure_Refresh"
<< "Part_Measure_Clear_All"
<< "Part_Measure_Toggle_All"
<< "Part_Measure_Toggle_3d"
<< "Part_Measure_Toggle_3D"
<< "Part_Measure_Toggle_Delta";

return root;
Expand Down

0 comments on commit 9177eae

Please sign in to comment.