diff --git a/src/Gui/ApplicationPy.cpp b/src/Gui/ApplicationPy.cpp index 1abab307b..cc81e2cb2 100644 --- a/src/Gui/ApplicationPy.cpp +++ b/src/Gui/ApplicationPy.cpp @@ -289,7 +289,7 @@ PyObject* Application::sOpen(PyObject * /*self*/, PyObject *args,PyObject * /*kw else if (ext == QLatin1String("py") || ext == QLatin1String("fcmacro") || ext == QLatin1String("fcscript")) { PythonEditor* editor = new PythonEditor(); - editor->setWindowIcon(Gui::BitmapFactory().pixmap("applications-python")); + editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python")); PythonEditorView* edit = new PythonEditorView(editor, getMainWindow()); edit->open(fileName); edit->resize(400, 300); @@ -360,7 +360,7 @@ PyObject* Application::sInsert(PyObject * /*self*/, PyObject *args,PyObject * /* else if (ext == QLatin1String("py") || ext == QLatin1String("fcmacro") || ext == QLatin1String("fcscript")) { PythonEditor* editor = new PythonEditor(); - editor->setWindowIcon(Gui::BitmapFactory().pixmap("applications-python")); + editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python")); PythonEditorView* edit = new PythonEditorView(editor, getMainWindow()); edit->open(fileName); edit->resize(400, 300); diff --git a/src/Gui/DlgMacroExecuteImp.cpp b/src/Gui/DlgMacroExecuteImp.cpp index 40475ddde..5fb73a211 100644 --- a/src/Gui/DlgMacroExecuteImp.cpp +++ b/src/Gui/DlgMacroExecuteImp.cpp @@ -182,7 +182,7 @@ void DlgMacroExecuteImp::on_createButton_clicked() } file.close(); PythonEditor* editor = new PythonEditor(); - editor->setWindowIcon(Gui::BitmapFactory().pixmap("applications-python")); + editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python")); PythonEditorView* edit = new PythonEditorView(editor, getMainWindow()); edit->open(fi.absoluteFilePath()); edit->setWindowTitle(QString::fromAscii("%1[*]").arg(fn)); diff --git a/src/Gui/Icons/index.theme b/src/Gui/Icons/index.theme index 13de16521..2681f1453 100644 --- a/src/Gui/Icons/index.theme +++ b/src/Gui/Icons/index.theme @@ -4,9 +4,9 @@ Comment=Default FreeCAD icon theme Inherits=Default # Directory list -Directories=. +Directories=scalable -[.] +[scalable] Size=48 MinSize=8 MaxSize=512 diff --git a/src/Gui/Icons/resource.qrc b/src/Gui/Icons/resource.qrc index d96d77153..df8690213 100644 --- a/src/Gui/Icons/resource.qrc +++ b/src/Gui/Icons/resource.qrc @@ -115,6 +115,79 @@ DrawStyleShaded.svg DrawStyleWireFrame.svg user.svg + + + + index.theme + + list-remove.svg + list-add.svg + media-playback-start.svg + media-record.svg + media-playback-stop.svg + utilities-terminal.svg + Std_ViewScreenShot.svg + breakpoint.svg + debug-marker.svg + debug-start.svg + debug-stop.svg + document-new.svg + document-open.svg + document-save.svg + document-save-as.svg + document-print.svg + document-print-preview.svg + document-properties.svg + application-exit.svg + edit-copy.svg + edit-cut.svg + edit-delete.svg + edit-paste.svg + edit-select-all.svg + edit-select-box.svg + edit-redo.svg + edit-undo.svg + edit-edit.svg + help-browser.svg + preferences-system.svg + window-new.svg + camera-photo.svg + applications-accessories.svg + applications-python.svg + accessories-text-editor.svg + accessories-calculator.svg + internet-web-browser.svg + view-select.svg + view-unselectable.svg + view-refresh.svg + view-fullscreen.svg + view-axometric.svg + view-isometric.svg + view-perspective.svg + view-bottom.svg + view-front.svg + view-left.svg + view-rear.svg + view-right.svg + view-top.svg + zoom-all.svg + zoom-border.svg + zoom-fit-best.svg + zoom-in.svg + zoom-out.svg + zoom-selection.svg + view-rotate-left.svg + view-rotate-right.svg + view-measurement.svg + Part_Measure_Clear_All.svg + Part_Measure_Toggle_All.svg + DrawStyleAsIs.svg + DrawStyleFlatLines.svg + DrawStylePoints.svg + DrawStyleShaded.svg + DrawStyleWireFrame.svg + user.svg + diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 6be3cafd5..a78bab8f8 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -370,7 +370,7 @@ MainWindow::MainWindow(QWidget * parent, Qt::WFlags f) // Python console PythonConsole* pcPython = new PythonConsole(this); pcPython->setWordWrapMode(QTextOption::NoWrap); - pcPython->setWindowIcon(Gui::BitmapFactory().pixmap("applications-python")); + pcPython->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python")); pcPython->setObjectName (QString::fromAscii(QT_TRANSLATE_NOOP("QDockWidget","Python console"))); pDockMgr->registerDockWindow("Std_PythonView", pcPython); diff --git a/src/Gui/PythonDebugger.cpp b/src/Gui/PythonDebugger.cpp index f265df746..71e159884 100644 --- a/src/Gui/PythonDebugger.cpp +++ b/src/Gui/PythonDebugger.cpp @@ -534,7 +534,7 @@ void PythonDebugger::showDebugMarker(const QString& fn, int line) if (!edit) { PythonEditor* editor = new PythonEditor(); - editor->setWindowIcon(Gui::BitmapFactory().pixmap("applications-python")); + editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python")); edit = new PythonEditorView(editor, getMainWindow()); edit->open(fn); edit->resize(400, 300); diff --git a/src/Gui/PythonEditor.cpp b/src/Gui/PythonEditor.cpp index 9da12c88e..008f654fb 100644 --- a/src/Gui/PythonEditor.cpp +++ b/src/Gui/PythonEditor.cpp @@ -55,8 +55,8 @@ struct PythonEditorP PythonDebugger* debugger; PythonEditorP() : debugLine(-1), - breakpoint(QLatin1String(":/icons/breakpoint.png")), - debugMarker(QLatin1String(":/icons/debug-marker.png")) + breakpoint(BitmapFactory().iconFromTheme("breakpoint").pixmap(16,16)), + debugMarker(BitmapFactory().iconFromTheme("debug-marker").pixmap(16,16)) { debugger = Application::Instance->macroManager()->debugger(); } diff --git a/src/Gui/ReportView.cpp b/src/Gui/ReportView.cpp index c130aa712..b6f57c150 100644 --- a/src/Gui/ReportView.cpp +++ b/src/Gui/ReportView.cpp @@ -75,7 +75,7 @@ ReportView::ReportView( QWidget* parent ) tabPython = new PythonConsole(); tabPython->setWordWrapMode(QTextOption::NoWrap); tabPython->setWindowTitle(trUtf8("Python console")); - tabPython->setWindowIcon(BitmapFactory().pixmap("applications-python")); + tabPython->setWindowIcon(BitmapFactory().iconFromTheme("applications-python")); int python = tabWidget->addTab(tabPython, tabPython->windowTitle()); tabWidget->setTabIcon(python, tabPython->windowIcon()); tabWidget->setCurrentIndex(0); diff --git a/src/Gui/SelectionView.cpp b/src/Gui/SelectionView.cpp index 05b1b8675..62aec0f8d 100644 --- a/src/Gui/SelectionView.cpp +++ b/src/Gui/SelectionView.cpp @@ -254,10 +254,10 @@ void SelectionView::onItemContextMenu(const QPoint& point) return; QMenu menu; QAction *selectAction = menu.addAction(tr("Select only"),this,SLOT(select())); - selectAction->setIcon(QIcon(QString::fromAscii(":/icons/view-select.svg"))); + selectAction->setIcon(QIcon::fromTheme(QString::fromAscii("view-select"))); selectAction->setToolTip(tr("Selects only this object")); QAction *deselectAction = menu.addAction(tr("Deselect"),this,SLOT(deselect())); - deselectAction->setIcon(QIcon(QString::fromAscii(":/icons/view-unselectable.svg"))); + deselectAction->setIcon(QIcon::fromTheme(QString::fromAscii("view-unselectable"))); deselectAction->setToolTip(tr("Deselects this object")); QAction *zoomAction = menu.addAction(tr("Zoom fit"),this,SLOT(zoom())); zoomAction->setIcon(QIcon::fromTheme(QString::fromAscii("zoom-fit-best"))); @@ -265,7 +265,7 @@ void SelectionView::onItemContextMenu(const QPoint& point) QAction *gotoAction = menu.addAction(tr("Go to selection"),this,SLOT(treeSelect())); gotoAction->setToolTip(tr("Selects and locates this object in the tree view")); QAction *toPythonAction = menu.addAction(tr("To python console"),this,SLOT(toPython())); - toPythonAction->setIcon(QIcon(QString::fromAscii(":/icons/applications-python.svg"))); + toPythonAction->setIcon(QIcon::fromTheme(QString::fromAscii("applications-python"))); toPythonAction->setToolTip(tr("Reveals this object and its subelements in the python console.")); menu.exec(selectionView->mapToGlobal(point)); }