Merge pull request #3101
Jason Papakostas (2): feat: install icons with make install on unix fix(Widget::updateIcons): fix the way systray icons are loaded
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 563 B |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 689 B After Width: | Height: | Size: 689 B |
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 784 B |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 937 B After Width: | Height: | Size: 937 B |
Before Width: | Height: | Size: 978 B After Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
11
qtox.pro
|
@ -187,6 +187,17 @@ win32 {
|
|||
desktop.files += qTox.desktop
|
||||
INSTALLS += target desktop
|
||||
|
||||
# Install application icons according to the XDG spec
|
||||
ICON_SIZES = 14 16 22 24 32 36 48 64 72 96 128 192 256 512
|
||||
for(icon_size, ICON_SIZES) {
|
||||
icon_$${icon_size}.files = img/icons/$${icon_size}x$${icon_size}/qtox.png
|
||||
icon_$${icon_size}.path = $$DATADIR/icons/hicolor/$${icon_size}x$${icon_size}/apps
|
||||
INSTALLS += icon_$${icon_size}
|
||||
}
|
||||
icon_scalable.files = img/icons/qtox.svg
|
||||
icon_scalable.path = $$DATADIR/icons/hicolor/scalable/apps
|
||||
INSTALLS += icon_scalable
|
||||
|
||||
# If we're building a package, static link libtox[core,av] and libsodium, since they are not provided by any package
|
||||
contains(STATICPKG, YES) {
|
||||
LIBS += -L$$PWD/libs/lib/ -lopus -lvpx -lopenal -Wl,-Bstatic -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lsodium -lavformat -lavdevice -lavcodec -lavutil -lswscale -lz -Wl,-Bdynamic
|
||||
|
|
|
@ -445,8 +445,12 @@ void Widget::updateIcons()
|
|||
status = QStringLiteral("offline");
|
||||
}
|
||||
|
||||
QIcon ico = QIcon::fromTheme("qtox-" + status);
|
||||
if (ico.isNull())
|
||||
QIcon ico;
|
||||
if (QIcon::hasThemeIcon("qtox-" + status))
|
||||
{
|
||||
ico = QIcon::fromTheme("qtox-" + status);
|
||||
}
|
||||
else
|
||||
{
|
||||
QString color = Settings::getInstance().getLightTrayIcon() ? "light" : "dark";
|
||||
QString path = ":/img/taskbar/" + color + "/taskbar_" + status + ".svg";
|
||||
|
|