mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use better aliases for icons.
Icon aliases were complete mess. Some icons had alias some didn't. Named with underscores vs. hyphens vs. camelCase. Lower vs. upper case. "ICON" prefix vs. suffix vs. nothing. With vs. without filename suffix. Some didn't make sence. Eg. mapwidget-marker-gray (I can see, it's grey, but what does it represent?) Some were duplicated, eg warning vs. warning-icon. Some were name after widget, which is wrong. Do not reinvent wheel. Use widely used naming scheme close to Freedesktop Icon Naming Specification. This will enable usage of common icons from current set in the future. Thus Subsurface will fit nicely to GUI. This changes icon aliases to one, easy grep-able style. Signed-off-by: Martin Měřinský <mermar@centrum.cz>
This commit is contained in:
parent
0855f6f315
commit
8ef87e618a
26 changed files with 135 additions and 132 deletions
|
@ -215,7 +215,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icons/ostc3.png</normaloff>:icons/ostc3.png</iconset>
|
||||
<normaloff>:dc-ostc-3-icon</normaloff>:dc-ostc-3-icon</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -224,7 +224,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icons/suunto_vyper.png</normaloff>:icons/suunto_vyper.png</iconset>
|
||||
<normaloff>:dc-suunto-vyper-icon</normaloff>:dc-suunto-vyper-icon</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -233,7 +233,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icons/ostc2n.png</normaloff>:icons/ostc2n.png</iconset>
|
||||
<normaloff>:dc-ostc-2n-icon</normaloff>:dc-ostc-2n-icon</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -242,7 +242,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icons/ostc4.png</normaloff>:icons/ostc4.png</iconset>
|
||||
<normaloff>:dc-ostc-4-icon</normaloff>:dc-ostc-4-icon</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:filter-reset</normaloff>:filter-reset</iconset>
|
||||
<normaloff>:edit-clear-icon</normaloff>:edit-clear-icon</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
|
@ -88,7 +88,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:filter-hide</normaloff>:filter-hide</iconset>
|
||||
<normaloff>:hide-icon</normaloff>:hide-icon</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:mapwidget-marker-selected</normaloff>:mapwidget-marker-selected</iconset>
|
||||
<normaloff>:dive-location-marker-selected-icon</normaloff>:dive-location-marker-selected-icon</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -376,8 +376,8 @@ void DiveLocationModel::resetModel()
|
|||
|
||||
QVariant DiveLocationModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
static const QIcon plusIcon(":plus");
|
||||
static const QIcon geoCode(":geocode");
|
||||
static const QIcon plusIcon(":list-add-icon");
|
||||
static const QIcon geoCode(":geotag-icon");
|
||||
|
||||
if (index.row() <= 1) { // two special cases.
|
||||
if (index.column() == UUID) {
|
||||
|
|
|
@ -454,7 +454,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_o2</normaloff>:icon_o2</iconset>
|
||||
<normaloff>:pp-o2-icon</normaloff>:pp-o2-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle pO₂ graph</string>
|
||||
|
@ -466,7 +466,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_n2</normaloff>:icon_n2</iconset>
|
||||
<normaloff>:pp-n2-icon</normaloff>:pp-n2-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle pN₂ graph</string>
|
||||
|
@ -478,7 +478,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_he</normaloff>:icon_he</iconset>
|
||||
<normaloff>:pp-he-icon</normaloff>:pp-he-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle pHe graph</string>
|
||||
|
@ -490,7 +490,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_ceiling_dc</normaloff>:icon_ceiling_dc</iconset>
|
||||
<normaloff>:ceiling-dc-icon</normaloff>:ceiling-dc-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle DC reported ceiling</string>
|
||||
|
@ -502,7 +502,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_ceiling_calculated</normaloff>:icon_ceiling_calculated</iconset>
|
||||
<normaloff>:ceiling-calculated-icon</normaloff>:ceiling-calculated-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle calculated ceiling</string>
|
||||
|
@ -514,7 +514,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_ceiling_alltissues</normaloff>:icon_ceiling_alltissues</iconset>
|
||||
<normaloff>:ceiling-tissues-icon</normaloff>:ceiling-tissues-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle calculating all tissues</string>
|
||||
|
@ -526,7 +526,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_ceiling_3m</normaloff>:icon_ceiling_3m</iconset>
|
||||
<normaloff>:ceiling-increments-icon</normaloff>:ceiling-increments-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle calculated ceiling with 3m increments</string>
|
||||
|
@ -538,7 +538,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_HR</normaloff>:icon_HR</iconset>
|
||||
<normaloff>:rate-heart-icon</normaloff>:rate-heart-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle heart rate</string>
|
||||
|
@ -550,7 +550,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_mod</normaloff>:icon_mod</iconset>
|
||||
<normaloff>:depth-mod-icon</normaloff>:depth-mod-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle MOD</string>
|
||||
|
@ -562,7 +562,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_ead</normaloff>:icon_ead</iconset>
|
||||
<normaloff>:depth-ead-icon</normaloff>:depth-ead-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle EAD, END, EADD</string>
|
||||
|
@ -574,7 +574,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_NDLTTS</normaloff>:icon_NDLTTS</iconset>
|
||||
<normaloff>:depth-ndl-icon</normaloff>:depth-ndl-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle NDL, TTS</string>
|
||||
|
@ -586,7 +586,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_lung</normaloff>:icon_lung</iconset>
|
||||
<normaloff>:rate-sac-icon</normaloff>:rate-sac-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle SAC rate</string>
|
||||
|
@ -598,7 +598,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:ruler</normaloff>:ruler</iconset>
|
||||
<normaloff>:ruler-icon</normaloff>:ruler-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle ruler</string>
|
||||
|
@ -610,7 +610,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:scale</normaloff>:scale</iconset>
|
||||
<normaloff>:scale-graph-icon</normaloff>:scale-graph-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale graph</string>
|
||||
|
@ -622,7 +622,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:pictures</normaloff>:pictures</iconset>
|
||||
<normaloff>:photo-icon</normaloff>:photo-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle pictures</string>
|
||||
|
@ -634,7 +634,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:gaschange</normaloff>:gaschange</iconset>
|
||||
<normaloff>:gaschange-icon</normaloff>:gaschange-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle gas bar</string>
|
||||
|
@ -657,7 +657,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../subsurface.qrc">
|
||||
<normaloff>:icon_tissue</normaloff>:icon_tissue</iconset>
|
||||
<normaloff>:heatmap-icon</normaloff>:heatmap-icon</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Toggle tissue heat-map</string>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <QFileDialog>
|
||||
|
||||
PreferencesDefaults::PreferencesDefaults(): AbstractPreferencesWidget(tr("General"), QIcon(":defaults"), 0 ), ui(new Ui::PreferencesDefaults())
|
||||
PreferencesDefaults::PreferencesDefaults(): AbstractPreferencesWidget(tr("General"), QIcon(":preferences-other-icon"), 0 ), ui(new Ui::PreferencesDefaults())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <ctime>
|
||||
|
||||
PreferencesGeoreference::PreferencesGeoreference() : AbstractPreferencesWidget(tr("Georeference"), QIcon(":georeference"), 9)
|
||||
PreferencesGeoreference::PreferencesGeoreference() : AbstractPreferencesWidget(tr("Georeference"), QIcon(":geotag-icon"), 9)
|
||||
{
|
||||
ui = new Ui::PreferencesGeoreference();
|
||||
ui->setupUi(this);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "qt-models/models.h"
|
||||
|
||||
PreferencesGraph::PreferencesGraph() : AbstractPreferencesWidget(tr("Profile"), QIcon(":graph"), 5)
|
||||
PreferencesGraph::PreferencesGraph() : AbstractPreferencesWidget(tr("Profile"), QIcon(":graph-icon"), 5)
|
||||
{
|
||||
ui = new Ui::PreferencesGraph();
|
||||
ui->setupUi(this);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "qt-models/models.h"
|
||||
|
||||
PreferencesLanguage::PreferencesLanguage() : AbstractPreferencesWidget(tr("Language"), QIcon(":language"), 4)
|
||||
PreferencesLanguage::PreferencesLanguage() : AbstractPreferencesWidget(tr("Language"), QIcon(":preferences-desktop-locale-icon"), 4)
|
||||
{
|
||||
ui = new Ui::PreferencesLanguage();
|
||||
ui->setupUi(this);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "core/subsurface-qt/SettingsObjectWrapper.h"
|
||||
#include <QNetworkProxy>
|
||||
|
||||
PreferencesNetwork::PreferencesNetwork() : AbstractPreferencesWidget(tr("Network"),QIcon(":network"), 9), ui(new Ui::PreferencesNetwork())
|
||||
PreferencesNetwork::PreferencesNetwork() : AbstractPreferencesWidget(tr("Network"),QIcon(":preferences-system-network-icon"), 9), ui(new Ui::PreferencesNetwork())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "core/qthelper.h"
|
||||
#include "core/subsurface-qt/SettingsObjectWrapper.h"
|
||||
|
||||
PreferencesUnits::PreferencesUnits(): AbstractPreferencesWidget(tr("Units"),QIcon(":units"),1), ui(new Ui::PreferencesUnits())
|
||||
PreferencesUnits::PreferencesUnits(): AbstractPreferencesWidget(tr("Units"),QIcon(":units-icon"),1), ui(new Ui::PreferencesUnits())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
<iconset theme="go-up-icon">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
<iconset theme="go-down-icon">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
|
|
|
@ -30,13 +30,13 @@ public:
|
|||
MinMaxAvgWidgetPrivate(MinMaxAvgWidget *owner)
|
||||
{
|
||||
avgIco = new QLabel(owner);
|
||||
avgIco->setPixmap(QIcon(":average").pixmap(16, 16));
|
||||
avgIco->setPixmap(QIcon(":value-average-icon").pixmap(16, 16));
|
||||
avgIco->setToolTip(QObject::tr("Average"));
|
||||
minIco = new QLabel(owner);
|
||||
minIco->setPixmap(QIcon(":minimum").pixmap(16, 16));
|
||||
minIco->setPixmap(QIcon(":value-minimum-icon").pixmap(16, 16));
|
||||
minIco->setToolTip(QObject::tr("Minimum"));
|
||||
maxIco = new QLabel(owner);
|
||||
maxIco->setPixmap(QIcon(":maximum").pixmap(16, 16));
|
||||
maxIco->setPixmap(QIcon(":value-maximum-icon").pixmap(16, 16));
|
||||
maxIco->setToolTip(QObject::tr("Maximum"));
|
||||
avgValue = new QLabel(owner);
|
||||
minValue = new QLabel(owner);
|
||||
|
|
|
@ -99,7 +99,7 @@ StarWidget::StarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f),
|
|||
int dim = defaultIconMetrics().sz_small;
|
||||
|
||||
if (activeStar.isNull()) {
|
||||
QSvgRenderer render(QString(":star"));
|
||||
QSvgRenderer render(QString(":star-icon"));
|
||||
QPixmap renderedStar(dim, dim);
|
||||
|
||||
renderedStar.fill(Qt::transparent);
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../subsurface.qrc">
|
||||
<normaloff>:geocode</normaloff>:geocode</iconset>
|
||||
<normaloff>:geotag-icon</normaloff>:geotag-icon</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -43,7 +43,7 @@ TableView::TableView(QWidget *parent) : QGroupBox(parent)
|
|||
}
|
||||
layout()->setContentsMargins(margins);
|
||||
|
||||
QIcon plusIcon(":plus");
|
||||
QIcon plusIcon(":list-add-icon");
|
||||
plusBtn = new QPushButton(plusIcon, QString(), this);
|
||||
plusBtn->setFlat(true);
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ SearchBar::SearchBar(QWidget *parent): QWidget(parent)
|
|||
{
|
||||
ui.setupUi(this);
|
||||
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
|
||||
ui.findNext->setIcon(QIcon(":icons/subsurface/32x32/actions/go-down.png"));
|
||||
ui.findPrev->setIcon(QIcon(":icons/subsurface/32x32/actions/go-up.png"));
|
||||
ui.findClose->setIcon(QIcon(":icons/subsurface/32x32/actions/window-close.png"));
|
||||
ui.findNext->setIcon(QIcon(":go-down-icon"));
|
||||
ui.findPrev->setIcon(QIcon(":go-up-icon"));
|
||||
ui.findClose->setIcon(QIcon(":window-close-icon"));
|
||||
#endif
|
||||
|
||||
connect(ui.findNext, SIGNAL(pressed()), this, SIGNAL(searchNext()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue