1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

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
This commit is contained in:
sudden6 2016-04-11 19:00:21 +02:00
commit 87c881edde
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
16 changed files with 17 additions and 2 deletions

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

View File

Before

Width:  |  Height:  |  Size: 563 B

After

Width:  |  Height:  |  Size: 563 B

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 689 B

After

Width:  |  Height:  |  Size: 689 B

View File

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 784 B

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 937 B

View File

Before

Width:  |  Height:  |  Size: 978 B

After

Width:  |  Height:  |  Size: 978 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -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

View File

@ -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";