From b77661764680a06de80359763ac7fee3f30b5dd4 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Sat, 8 Jun 2019 13:07:01 +0200 Subject: [PATCH] Added new indicator icons for dark and clear backgrounds Default to dark because it's more common (Windows, Gnome) but we need to implement a way to chose automatically between the dark and clear icon (and this is gonna be platform-specific). Note that dashes in names have a special meaning when loading icons. The new icon file names are ugly for this reason. --- icon/CMakeLists.txt | 8 + icon/sc-apps-kdeconnectindicator.svg | 228 +++++++++++++++++++++++ icon/sc-apps-kdeconnectindicatordark.svg | 228 +++++++++++++++++++++++ indicator/main.cpp | 4 +- 4 files changed, 466 insertions(+), 2 deletions(-) create mode 100644 icon/sc-apps-kdeconnectindicator.svg create mode 100644 icon/sc-apps-kdeconnectindicatordark.svg diff --git a/icon/CMakeLists.txt b/icon/CMakeLists.txt index 00bfb2134..d9f06daea 100644 --- a/icon/CMakeLists.txt +++ b/icon/CMakeLists.txt @@ -9,6 +9,14 @@ ICONS 22-apps-kdeconnect.png 16-apps-kdeconnect.png sc-apps-kdeconnect.svgz + sc-apps-kdeconnectindicator.svg + sc-apps-kdeconnectindicatordark.svg +DESTINATION + ${ICON_INSTALL_DIR} +) + +ecm_install_icons( +ICONS 32-status-laptopconnected.png 32-status-laptopdisconnected.png 32-status-laptoptrusted.png diff --git a/icon/sc-apps-kdeconnectindicator.svg b/icon/sc-apps-kdeconnectindicator.svg new file mode 100644 index 000000000..78dbd1f0d --- /dev/null +++ b/icon/sc-apps-kdeconnectindicator.svg @@ -0,0 +1,228 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/sc-apps-kdeconnectindicatordark.svg b/icon/sc-apps-kdeconnectindicatordark.svg new file mode 100644 index 000000000..3ee429a48 --- /dev/null +++ b/icon/sc-apps-kdeconnectindicatordark.svg @@ -0,0 +1,228 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indicator/main.cpp b/indicator/main.cpp index 31d5f9d66..703ce3c33 100644 --- a/indicator/main.cpp +++ b/indicator/main.cpp @@ -94,7 +94,7 @@ int main(int argc, char** argv) #ifdef QSYSTRAY QSystemTrayIcon systray; - systray.setIcon(QIcon::fromTheme("kdeconnect")); + systray.setIcon(QIcon::fromTheme("kdeconnectindicatordark")); systray.setVisible(true); systray.setToolTip("KDE Connect"); QObject::connect(&model, &DevicesModel::rowsChanged, &model, [&systray, &model]() { @@ -104,7 +104,7 @@ int main(int argc, char** argv) systray.setContextMenu(menu); #else KStatusNotifierItem systray; - systray.setIconByName(QStringLiteral("kdeconnect")); + systray.setIconByName(QStringLiteral("kdeconnectindicatordark")); systray.setToolTip(QStringLiteral("kdeconnect"), "KDE Connect", "KDE Connect"); systray.setCategory(KStatusNotifierItem::Communications); systray.setStatus(KStatusNotifierItem::Passive);