fix new indicator icon
This commit is contained in:
parent
e6f8a391c9
commit
875eba8e07
4 changed files with 40 additions and 4 deletions
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
ecm_install_icons(
|
set(APP_ICONS
|
||||||
ICONS
|
|
||||||
256-apps-kdeconnect.png
|
256-apps-kdeconnect.png
|
||||||
128-apps-kdeconnect.png
|
128-apps-kdeconnect.png
|
||||||
32-apps-kdeconnect.png
|
32-apps-kdeconnect.png
|
||||||
|
@ -10,7 +9,17 @@ ICONS
|
||||||
16-apps-kdeconnect.png
|
16-apps-kdeconnect.png
|
||||||
sc-apps-kdeconnect.svgz
|
sc-apps-kdeconnect.svgz
|
||||||
sc-apps-kdeconnectindicator.svg
|
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
|
DESTINATION
|
||||||
${ICON_INSTALL_DIR}
|
${ICON_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
|
|
21
icon/sc-apps-kdeconnectindicatorwin.svg
Normal file
21
icon/sc-apps-kdeconnectindicatorwin.svg
Normal 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 |
|
@ -20,6 +20,8 @@ target_link_libraries(kdeconnect-indicator Qt5::Widgets KF5::CoreAddons KF5::I18
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
target_link_libraries(kdeconnect-indicator "-framework CoreFoundation")
|
target_link_libraries(kdeconnect-indicator "-framework CoreFoundation")
|
||||||
endif()
|
endif()
|
||||||
|
if (WIN32)
|
||||||
|
add_compile_definitions(QSYSTRAY)
|
||||||
|
endif()
|
||||||
install(TARGETS kdeconnect-indicator ${INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS kdeconnect-indicator ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
install(PROGRAMS org.kde.kdeconnect.nonplasma.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
|
install(PROGRAMS org.kde.kdeconnect.nonplasma.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
|
||||||
|
|
|
@ -164,7 +164,11 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
#ifdef QSYSTRAY
|
#ifdef QSYSTRAY
|
||||||
QSystemTrayIcon systray;
|
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")));
|
systray.setIcon(QIcon::fromTheme(QStringLiteral("kdeconnectindicatordark")));
|
||||||
|
#endif
|
||||||
systray.setVisible(true);
|
systray.setVisible(true);
|
||||||
systray.setToolTip(QStringLiteral("KDE Connect"));
|
systray.setToolTip(QStringLiteral("KDE Connect"));
|
||||||
QObject::connect(&model, &DevicesModel::rowsChanged, &model, [&systray, &model]() {
|
QObject::connect(&model, &DevicesModel::rowsChanged, &model, [&systray, &model]() {
|
||||||
|
|
Loading…
Reference in a new issue