From 92e9c6606f6ef3ad16d2e31f9f9a8f5fa14f2c1a Mon Sep 17 00:00:00 2001 From: Martin Měřinský Date: Wed, 29 Nov 2017 10:57:08 +0100 Subject: Use consistent aliases for all icons. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Icon aliases were inconsistent mess. Underscores vs. hyphens vs. camelCase. With vs. without filename suffix. Lower vs. upper case. "icon" suffix vs. prefix vs. nothing. Some were duplicated, eg warning vs. warning-icon. Some icons didn't have alias at all. This changes all icon aliases to one, easy grep-able style which complies to Freedesktop Icon Naming Specification (Guidelines). Signed-off-by: Martin Měřinský --- qt-models/divelocationmodel.cpp | 4 ++-- qt-models/divetripmodel.cpp | 2 +- qt-models/models.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'qt-models') diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index 794302fe2..d6fb09573 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -80,7 +80,7 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons } return textField->text(); } - case Qt::DecorationRole : return QIcon(":plus"); + case Qt::DecorationRole : return QIcon(":list-add-icon"); } } @@ -108,7 +108,7 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons break; case Qt::DecorationRole : { if (dive_site_has_gps_location(ds)) - return QIcon(":geocode"); + return QIcon(":geotag-icon"); else return QVariant(); } diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 2a0b29449..b9693fcd2 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -85,7 +85,7 @@ QVariant TripItem::data(int column, int role) const QVariant DiveItem::data(int column, int role) const { QVariant retVal; - QString icon_names[4] = {":zero",":duringPhoto", ":outsidePhoto", ":inAndOutPhoto" }; + QString icon_names[4] = {":zero",":photo-in-icon", ":photo-out-icon", ":photo-in-out-icon" }; struct dive *dive = get_dive_by_uniq_id(diveId); if (!dive) return QVariant(); diff --git a/qt-models/models.cpp b/qt-models/models.cpp index c5bfda745..fa9519600 100644 --- a/qt-models/models.cpp +++ b/qt-models/models.cpp @@ -14,13 +14,13 @@ const QPixmap &trashIcon() { - static QPixmap trash = QPixmap(":trash").scaledToHeight(defaultIconMetrics().sz_small); + static QPixmap trash = QPixmap(":list-remove-icon").scaledToHeight(defaultIconMetrics().sz_small); return trash; } const QPixmap &trashForbiddenIcon() { - static QPixmap trash = QPixmap(":trashForbidden").scaledToHeight(defaultIconMetrics().sz_small); + static QPixmap trash = QPixmap(":list-remove-disabled-icon").scaledToHeight(defaultIconMetrics().sz_small); return trash; } -- cgit v1.2.3-70-g09d2