📜 ⬆️ ⬇️

We bring Skype icons to the general style of the system.

In the interface of each operating system there is such a thing as a notification area .

There are various indicators and switches, for example, the volume indicator. Most indicators follow the recommendations , but not Skype. Tallinn Redmond programmers are so harsh that they have an opinion on how their icons should look in the indicator panel. However, one line of code is enough to align their icons.

Skype icon before and after

The problem of Skype’s “humanization” is that all icons are protected deep inside the application, although the sounds for notifications are available to anyone in the / usr / share / skype folder. There is no possibility just to take and put the necessary icons in ~ / .local / share / icons I, as probably many other Skype users, treated these icons, clearly out of the general style, as an unreliable evil.
')
As long as on one of the computers, when upgrading from a 32-bit system to a 64-bit system, Skype in general ceased to appear in the indicator panel. A small study showed that the lack of a sni-qt library, magically transforming QSystemTrayIcon into StatusNotifierItems, is to blame for this.
And this means that there is a small open source library between the proprietary Skype and the indicator panel.

Download:
apt-get source sni-qt && cd sni-qt* 

In the src directory we are waiting for two dozen files, including iconcache.cpp

Searching for the word “save” gives exactly one result:
  QPixmap pix = icon.pixmap(size); QString dirName = QString("hicolor/%1x%1/apps").arg(size.width()); if (!dir.exists(dirName)) { if (!dir.mkpath(dirName)) { qWarning("Could not create '%s' dir in '%s'", qPrintable(m_themePath), qPrintable(dirName)); continue; } } QString pixPath = QString("%1/%2/%3.png") .arg(m_themePath).arg(dirName).arg(key); if (!pix.save(pixPath, "png")) { qWarning("Could not save icon as '%s'", qPrintable(pixPath)); } 

All you need to do is replace

 - QPixmap pix = icon.pixmap(size); 
on
 + QPixmap pix = icon.pixmap(size, QIcon::Disabled); 

This will turn all color icons to gray. Approximately the ones that are needed for the humanity-dark theme.
For humanity, the default themes in Ubuntu versions before 10.04, you need to translate the palette to the dark side of the force .

We collect and run:
 sudo apt-get build-dep sni-qt mkdir build && cmake --build=build . make && sudo make install 

That's all. The Skype icon no longer blisters the eyes and looks quite satisfactory.

Patch file for those who want to try apt-build --patch mono.patch install sni-qt
sni-qt_0.2.6-0ubuntu1_i386.deb for those who want to get everything at once.

Source: https://habr.com/ru/post/181934/


All Articles