Skip to content

Commit a63d691

Browse files
committed
+ Updated almost all icons from PNGs to SVGs. + The toolbar icon size can be changed via settings. + The library icon size can be changed via settings. git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23058 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 74a3c79 commit a63d691

File tree

120 files changed

+8899
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+8899
-462
lines changed

OMEdit/OMEditGUI/Annotations/ShapeAnnotation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ void ShapeAnnotation::setDefaults()
390390
mOriginalFileName = "";
391391
mFileName = "";
392392
mImageSource = "";
393-
mImage = QImage(":/Resources/icons/bitmap-shape.png");
393+
mImage = QImage(":/Resources/icons/bitmap-shape.svg");
394394
}
395395

396396
/*!

OMEdit/OMEditGUI/Annotations/ShapePropertiesDialog.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,20 +392,24 @@ ShapePropertiesDialog::ShapePropertiesDialog(ShapeAnnotation *pShapeAnnotation,
392392
// points navigation buttons
393393
mpMovePointUpButton = new QToolButton;
394394
mpMovePointUpButton->setObjectName("ShapePointsButton");
395-
mpMovePointUpButton->setIcon(QIcon(":/Resources/icons/up.png"));
395+
mpMovePointUpButton->setIcon(QIcon(":/Resources/icons/up.svg"));
396+
mpMovePointUpButton->setToolTip(tr("Move point up"));
396397
connect(mpMovePointUpButton, SIGNAL(clicked()), SLOT(movePointUp()));
397398
mpMovePointDownButton = new QToolButton;
398399
mpMovePointDownButton->setObjectName("ShapePointsButton");
399-
mpMovePointDownButton->setIcon(QIcon(":/Resources/icons/down.png"));
400+
mpMovePointDownButton->setIcon(QIcon(":/Resources/icons/down.svg"));
401+
mpMovePointDownButton->setToolTip(tr("Move point down"));
400402
connect(mpMovePointDownButton, SIGNAL(clicked()), SLOT(movePointDown()));
401403
// points manipulation buttons
402404
mpAddPointButton = new QToolButton;
403405
mpAddPointButton->setObjectName("ShapePointsButton");
404406
mpAddPointButton->setIcon(QIcon(":/Resources/icons/add-icon.svg"));
407+
mpAddPointButton->setToolTip(tr("Add new point"));
405408
connect(mpAddPointButton, SIGNAL(clicked()), SLOT(addPoint()));
406409
mpRemovePointButton = new QToolButton;
407410
mpRemovePointButton->setObjectName("ShapePointsButton");
408411
mpRemovePointButton->setIcon(QIcon(":/Resources/icons/delete.svg"));
412+
mpRemovePointButton->setToolTip(tr("Remove point"));
409413
connect(mpRemovePointButton, SIGNAL(clicked()), SLOT(removePoint()));
410414
mpPointsButtonBox = new QDialogButtonBox(Qt::Vertical);
411415
mpPointsButtonBox->addButton(mpMovePointUpButton, QDialogButtonBox::ActionRole);

OMEdit/OMEditGUI/MainWindow.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,8 @@ MainWindow::MainWindow(QSplashScreen *pSplashScreen, QWidget *parent)
230230
if (mpMessagesWidget->getMessagesTreeWidget()->topLevelItemCount() > 0) restoreMessagesWidget = true;
231231
restoreState(pSettings->value("application/windowState").toByteArray());
232232
if (restoreMessagesWidget) mpMessagesDockWidget->show();
233-
mpPerspectiveTabbar->setCurrentIndex(0);
234-
switchToWelcomePerspective();
235233
}
234+
switchToWelcomePerspective();
236235
// read last Open Directory location
237236
if (pSettings->contains("lastOpenDirectory"))
238237
StringHandler::setLastOpenDirectory(pSettings->value("lastOpenDirectory").toString());
@@ -1947,11 +1946,11 @@ void MainWindow::createActions()
19471946
mpClearRecentFilesAction->setStatusTip(tr("Clears the recent files list"));
19481947
connect(mpClearRecentFilesAction, SIGNAL(triggered()), SLOT(clearRecentFilesList()));
19491948
// print action
1950-
mpPrintModelAction = new QAction(QIcon(":/Resources/icons/print.png"), tr("Print..."), this);
1949+
mpPrintModelAction = new QAction(QIcon(":/Resources/icons/print.svg"), tr("Print..."), this);
19511950
mpPrintModelAction->setShortcut(QKeySequence("Ctrl+p"));
19521951
mpPrintModelAction->setEnabled(false);
19531952
// close OMEdit action
1954-
mpQuitAction = new QAction(QIcon(":/Resources/icons/quit.png"), tr("Quit"), this);
1953+
mpQuitAction = new QAction(QIcon(":/Resources/icons/quit.svg"), tr("Quit"), this);
19551954
mpQuitAction->setStatusTip(tr("Quit the ").append(Helper::applicationIntroText));
19561955
mpQuitAction->setShortcut(QKeySequence("Ctrl+q"));
19571956
connect(mpQuitAction, SIGNAL(triggered()), SLOT(close()));
@@ -1967,7 +1966,7 @@ void MainWindow::createActions()
19671966
mpPasteAction = new QAction(QIcon(":/Resources/icons/paste.svg"), tr("Paste"), this);
19681967
mpPasteAction->setShortcut(QKeySequence("Ctrl+v"));
19691968
// find replace class action
1970-
mpFindReplaceAction = new QAction(QIcon(":/Resources/icons/search.png"), QString(Helper::findReplaceModelicaText), this);
1969+
mpFindReplaceAction = new QAction(QString(Helper::findReplaceModelicaText), this);
19711970
mpFindReplaceAction->setStatusTip(tr("Shows the Find/Replace window"));
19721971
mpFindReplaceAction->setShortcut(QKeySequence("Ctrl+f"));
19731972
mpFindReplaceAction->setEnabled(false);
@@ -2089,7 +2088,7 @@ void MainWindow::createActions()
20892088
mpImportNgspiceNetlistAction->setStatusTip(Helper::importNgspiceNetlistTip);
20902089
connect(mpImportNgspiceNetlistAction, SIGNAL(triggered()), SLOT(importNgspiceNetlist()));
20912090
// open options action
2092-
mpOptionsAction = new QAction(QIcon(":/Resources/icons/options.png"), tr("Options"), this);
2091+
mpOptionsAction = new QAction(QIcon(":/Resources/icons/options.svg"), tr("Options"), this);
20932092
mpOptionsAction->setStatusTip(tr("Shows the options window"));
20942093
mpOptionsAction->setMenuRole(QAction::PreferencesRole);
20952094
connect(mpOptionsAction, SIGNAL(triggered()), SLOT(openConfigurationOptions()));
@@ -2158,7 +2157,7 @@ void MainWindow::createActions()
21582157
mpBitmapShapeAction->setCheckable(true);
21592158
connect(mpBitmapShapeAction, SIGNAL(triggered()), SLOT(toggleShapesButton()));
21602159
// connect/unconnect action
2161-
mpConnectModeAction = new QAction(QIcon(":/Resources/icons/connect-mode.png"), tr("Connect/Unconnect Mode"), mpShapesActionGroup);
2160+
mpConnectModeAction = new QAction(QIcon(":/Resources/icons/connect-mode.svg"), tr("Connect/Unconnect Mode"), mpShapesActionGroup);
21622161
mpConnectModeAction->setStatusTip(tr("Changes to/from connect mode"));
21632162
mpConnectModeAction->setCheckable(true);
21642163
mpConnectModeAction->setChecked(true);
@@ -2183,7 +2182,7 @@ void MainWindow::createActions()
21832182
mpNewParametricPlotWindowAction->setStatusTip(tr("Inserts new parametric plot window"));
21842183
connect(mpNewParametricPlotWindowAction, SIGNAL(triggered()), SLOT(addNewParametricPlotWindow()));
21852184
// clear plot window action
2186-
mpClearPlotWindowAction = new QAction(QIcon(":/Resources/icons/clearmessages.png"), tr("Clear Plot Window"), this);
2185+
mpClearPlotWindowAction = new QAction(QIcon(":/Resources/icons/clear.svg"), tr("Clear Plot Window"), this);
21872186
mpClearPlotWindowAction->setStatusTip(tr("Clears all the curves from the plot window"));
21882187
connect(mpClearPlotWindowAction, SIGNAL(triggered()), SLOT(clearPlotWindow()));
21892188
// Other Actions
@@ -2395,7 +2394,8 @@ void MainWindow::switchToPlottingPerspective()
23952394
//! Creates the toolbars
23962395
void MainWindow::createToolbars()
23972396
{
2398-
setIconSize(QSize(16, 16));
2397+
int toolbarIconSize = mpOptionsDialog->getGeneralSettingsPage()->getToolbarIconSizeSpinBox()->value();
2398+
setIconSize(QSize(toolbarIconSize, toolbarIconSize));
23992399
// File Toolbar
24002400
mpFileToolBar = addToolBar(tr("File Toolbar"));
24012401
mpFileToolBar->setObjectName("File Toolbar");
@@ -2464,13 +2464,12 @@ void MainWindow::createToolbars()
24642464
mpModelSwitcherToolButton->setEnabled(false);
24652465
mpModelSwitcherToolButton->setMenu(mpModelSwitcherMenu);
24662466
mpModelSwitcherToolButton->setPopupMode(QToolButton::MenuButtonPopup);
2467-
mpModelSwitcherToolButton->setIcon(QIcon(":/Resources/icons/switch.png"));
2467+
mpModelSwitcherToolButton->setIcon(QIcon(":/Resources/icons/switch.svg"));
24682468
mpModelSwitcherToolBar->addWidget(mpModelSwitcherToolButton);
24692469
// Plot Toolbar
24702470
mpPlotToolBar = addToolBar(tr("Plot Toolbar"));
24712471
mpPlotToolBar->setObjectName("Plot Toolbar");
24722472
mpPlotToolBar->setAllowedAreas(Qt::TopToolBarArea);
2473-
mpPlotToolBar->setEnabled(false);
24742473
// add actions to Plot Toolbar
24752474
mpPlotToolBar->addAction(mpReSimulateModelAction);
24762475
mpPlotToolBar->addSeparator();
@@ -2540,7 +2539,7 @@ InfoBar::InfoBar(QWidget *pParent)
25402539
mpInfoLabel->setWordWrap(true);
25412540
mpCloseButton = new QToolButton;
25422541
mpCloseButton->setAutoRaise(true);
2543-
mpCloseButton->setIcon(QIcon(":/Resources/icons/clear.png"));
2542+
mpCloseButton->setIcon(QIcon(":/Resources/icons/delete.svg"));
25442543
mpCloseButton->setToolTip(Helper::close);
25452544
connect(mpCloseButton, SIGNAL(clicked()), SLOT(hide()));
25462545
// set the layout

OMEdit/OMEditGUI/MainWindow.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ private slots:
354354
void switchToWelcomePerspective();
355355
void switchToModelingPerspective();
356356
void switchToPlottingPerspective();
357-
void switchToInteractiveSimulationPerspective();
358357
protected:
359358
virtual void dragEnterEvent(QDragEnterEvent *event);
360359
virtual void dragMoveEvent(QDragMoveEvent *event);

OMEdit/OMEditGUI/Modeling/DocumentationWidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ DocumentationWidget::DocumentationWidget(MainWindow *pParent)
5858
mpPreviousToolButton = new QToolButton;
5959
mpPreviousToolButton->setText(Helper::previous);
6060
mpPreviousToolButton->setToolTip(tr("click to go on previous (backspace)"));
61-
mpPreviousToolButton->setIcon(QIcon(":/Resources/icons/previous.png"));
61+
mpPreviousToolButton->setIcon(QIcon(":/Resources/icons/previous.svg"));
6262
mpPreviousToolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
6363
mpPreviousToolButton->setDisabled(true);
6464
connect(mpPreviousToolButton, SIGNAL(clicked()), SLOT(previousDocumentation()));
6565
// create the next button
6666
mpNextToolButton = new QToolButton;
6767
mpNextToolButton->setText(Helper::next);
6868
mpNextToolButton->setToolTip(tr("click to go on next (shift+backspace)"));
69-
mpNextToolButton->setIcon(QIcon(":/Resources/icons/next.png"));
69+
mpNextToolButton->setIcon(QIcon(":/Resources/icons/next.svg"));
7070
mpNextToolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
7171
mpNextToolButton->setDisabled(true);
7272
connect(mpNextToolButton, SIGNAL(clicked()), SLOT(nextDocumentation()));
@@ -274,7 +274,7 @@ void DocumentationViewer::showContextMenu(QPoint point)
274274
{
275275
Q_UNUSED(point);
276276
//! @todo Create the documentation actions here like the example below and then show them in the menu.
277-
/*QAction *pTestAction = new QAction(QIcon(":/Resources/icons/options.png"), tr("Properties"), this);
277+
/*QAction *pTestAction = new QAction(QIcon(":/Resources/icons/options.svg"), tr("Properties"), this);
278278
pTestAction->setStatusTip(tr("Shows the component properties"));
279279
connect(pTestAction, SIGNAL(triggered()), mpDocumentationWidget, SLOT(previousDocumentation()));
280280

0 commit comments

Comments
 (0)