justforlxz / deepin-topbar

Provide the function of the top bar, beautiful, easy to use.
https://blog.justforlxz.com/
GNU General Public License v3.0
326 stars 51 forks source link

System tray black icons #41

Open victorcifuentes opened 6 years ago

victorcifuentes commented 6 years ago

deepin-topbar-black-icons

Hi, I think black icons in system tray looks better for a light theme, I got this with a little hack. Do you know if exist other way to obtain black icons from the system?

diff --git a/modules/system-tray/traywidget.cpp b/modules/system-tray/traywidget.cpp index a57610b..af11e3b 100755 --- a/modules/system-tray/traywidget.cpp +++ b/modules/system-tray/traywidget.cpp @@ -492,8 +492,10 @@ void TrayWidget::refershIconImage() return;

m_image = qimage.scaled(16 * ratio, 16 * ratio, Qt::KeepAspectRatio, Qt::SmoothTransformation); + m_image = m_image.convertToFormat(QImage::Format_Alpha8, Qt::MonoOnly); m_image.setDevicePixelRatio(ratio);

update(); emit iconChanged(); }

justforlxz commented 6 years ago

Thank you for your advice, but the effect is not very satisfactory, some programs can not tell. _ _20180122091854

I plan to draw a large number of new icons to complete the work.

smold22 commented 6 years ago

deepin_top_bar2 If it is part of the market, then the rest https://yadi.sk/d/Vhs3NHw-3Syj7j