fix new indicator icon

This commit is contained in:
Piyush Aggarwal 2019-07-19 10:26:19 +00:00
parent e6f8a391c9
commit 875eba8e07
4 changed files with 40 additions and 4 deletions

View file

@ -1,6 +1,5 @@
ecm_install_icons(
ICONS
set(APP_ICONS
256-apps-kdeconnect.png
128-apps-kdeconnect.png
32-apps-kdeconnect.png
@ -10,7 +9,17 @@ ICONS
16-apps-kdeconnect.png
sc-apps-kdeconnect.svgz
sc-apps-kdeconnectindicator.svg
sc-apps-kdeconnectindicatordark.svg
)
if(WIN32)
list(APPEND APP_ICONS sc-apps-kdeconnectindicatorwin.svg)
else()
list(APPEND APP_ICONS sc-apps-kdeconnectindicatordark.svg)
endif()
ecm_install_icons(
ICONS
${APP_ICONS}
DESTINATION
${ICON_INSTALL_DIR}
)

View file

@ -0,0 +1,21 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="493.000000pt" height="493.000000pt" viewBox="0 0 493.000000 493.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.15, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,493.000000) scale(0.100000,-0.100000)"
fill="white" stroke="black" stroke-width="17">
<path d="M30 2465 l0 -2425 1820 0 1820 0 0 2425 0 2425 -1820 0 -1820 0 0
-2425z m3340 0 l0 -2125 -1520 0 -1520 0 0 2125 0 2125 1520 0 1520 0 0 -2125z"/>
<path d="M640 2465 l0 -1815 1210 0 1210 0 0 1815 0 1815 -1210 0 -1210 0 0
-1815z m952 535 l3 -360 255 346 c140 191 258 350 261 355 5 8 389 -71 432
-89 15 -6 -26 -64 -261 -371 l-280 -363 280 -385 c154 -211 278 -386 277 -388
-2 -2 -103 -33 -223 -69 -140 -42 -222 -62 -226 -56 -4 6 -121 179 -261 385
l-254 375 -3 -349 -2 -348 -198 -27 c-108 -15 -205 -30 -214 -32 -17 -5 -18
40 -18 848 l0 854 173 16 c94 8 191 16 214 16 l43 2 2 -360z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -20,6 +20,8 @@ target_link_libraries(kdeconnect-indicator Qt5::Widgets KF5::CoreAddons KF5::I18
if (APPLE)
target_link_libraries(kdeconnect-indicator "-framework CoreFoundation")
endif()
if (WIN32)
add_compile_definitions(QSYSTRAY)
endif()
install(TARGETS kdeconnect-indicator ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kdeconnect.nonplasma.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})

View file

@ -164,7 +164,11 @@ int main(int argc, char** argv)
#ifdef QSYSTRAY
QSystemTrayIcon systray;
#ifdef Q_OS_WIN
systray.setIcon(QIcon(QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("icons/hicolor/scalable/apps/kdeconnectindicatorwin.svg"))));
#else
systray.setIcon(QIcon::fromTheme(QStringLiteral("kdeconnectindicatordark")));
#endif
systray.setVisible(true);
systray.setToolTip(QStringLiteral("KDE Connect"));
QObject::connect(&model, &DevicesModel::rowsChanged, &model, [&systray, &model]() {