Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not use system icon theme for app icon #30

Closed
varlesh opened this issue Jun 21, 2016 · 42 comments
Closed

Not use system icon theme for app icon #30

varlesh opened this issue Jun 21, 2016 · 42 comments
Labels

Comments

@varlesh
Copy link

varlesh commented Jun 21, 2016

On Plasma 5 with widget task manager QMPlay2 use its icon (when player run):
screenshot_20160622_003127
But if player close - use system app icon theme:
screenshot_20160622_003105

I'm add option StartupWMClass="QMPlay2", "QMPlay2" on desktop file, but this not working :(

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

I don't know. I can try on Plasma 5 later (Arch Linux), but I don't know how does it work (I'm using Mate).
What is this? Is it an app launcher or system tray?

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

This panel launcher "tasks widget (icon only)". Maybe this icon on binary or program not like SVG. You can test this with icon:
https://raw.githubusercontent.com/PapirusDevelopmentTeam/papirus-icon-theme-kde/0d2972a72e7bc02437475bb16fdf9be1154a5fac/papirus/48x48/apps/QMPlay2.svg

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

Maybe just export it in Inkscape as PNG (e.g. 128x128) and replace the icon: /usr/share/icons/hicolor/128x128/apps/QMPlay2.png ?

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

By the by this symlink /usr/share/icons/hicolor/128x128/apps/QMPlay2.png > ../../../QMPlay2.png

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

sudo rm /usr/share/icons/hicolor/128x128/apps/QMPlay2.png
sudo rm /usr/share/icons/QMPlay2.png

And then just paste your new PNG icon here (/usr/share/icons/hicolor/128x128/apps) or maybe SVG will also work.

Which distribution do you use? If Arch Linux you can currently switch to qmplay2-git - it doesn't create the symlink :)

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

This not working (also i clear cache icon and plasma):
screenshot_20160622_011325

i'm use stable version on Manjaro KDE

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

Ok, i'm compile git-version from AUR and check this

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

I don't know if deleting cache doesn't help... Did you restart plasma? This is QMPlay2 independent...

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

Yes i'm delete cache and restart plasma:

rm -rf ~/.cache/plasm*
killall plasmashell

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

It's strange hm...
Git-version:
screenshot_20160622_013221

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

use xorg icon

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

Check whether /usr/share/icons/QMPlay2.png does not exists.
Check whether /usr/share/icons/hicolor/128x128/apps/QMPlay2.png exists.

and check the icon name in *.desktop files.

Delete caches, restart plasma...

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

Player closed - use system icon
screenshot_20160622_013413

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

Maybe there is another problem - does plasma update the icon from application icon?

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

/usr/share/icons/QMPlay2.png does not exists - confirm this
/usr/share/icons/hicolor/128x128/apps/QMPlay2.png exists - confirm this.
Desktop:

[Desktop Entry]
Exec=QMPlay2 %F
Icon=QMPlay2
Name=QMPlay2
StartupNotify=false
Type=Application
Categories=Qt;AudioVideo;Player;Audio;Video;
MimeType=video/mp4;video/mpeg;video/ogg;video/quicktime;video/x-msvideo;video/x-flv;application/x-shockwave-flash;application/vnd.rn-realmedia;video/vnd.rn-realvideo;video/3gpp;video/3gpp2;video/dv;video/webm;video/x-matroska;application/x-matroska;video/x-ms-asf;video/x-ms-wmv;video/x-ogm+ogg;video/x-theora+ogg;video/mp2t;audio/x-ape;audio/mp4;audio/AMR;audio/aac;audio/webm;audio/x-matroska;audio/ac3;audio/flac;audio/mp2;audio/ogg;audio/x-flac+ogg;audio/x-aiff;audio/x-wav;audio/x-vorbis+ogg;audio/x-tta;audio/x-wavpack;audio/x-musepack;audio/x-ms-wma;audio/x-ms-asx;audio/x-mod;audio/x-s3m;audio/x-stm;audio/x-xi;audio/x-xm;audio/x-it;audio/mpeg;audio/x-mpegurl;audio/x-scpls;audio/prs.sid;audio/x-j2b;audio/x-sfx;audio/x-umx;audio/x-gme;video/x-bink;

Now del cache and restart PC and check

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

I think that Plasma5 just loads the application/window icon instead of system icon if QMPlay2 is open.

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

I think that this line:

QApplication::setWindowIcon(QMPlay2Core.getQMPlay2Pixmap());
causes the problem. If yo really want to use other icon then I can try to load the system icon in this place.

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

For example, my friend programmer and use this variant:
Maybe help this :)

setWindowIcon(QIcon::fromTheme("krudio",QIcon(path+"krudio.svg")));//иконка окна
    if(save){//сохраняем изменения в базу
        QString str;
        QSqlQuery a_query;
        bool b;
        //Вставить значения
        QString str_insert = "UPDATE "+tableSettingName+" SET value = %1 WHERE setting ='%2';";
        str = str_insert.arg(colorNumb).arg("color");
        b = a_query.exec(str);
        if (!b) {qDebug() << "Данные не сохнаняются";}
    }
}

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

restart pc and clear cache not solved problem

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

Use system icon (if available) or not available use fallback icon from hicolor or another method.

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

Ok, I'll try :)

@zaps166 zaps166 added the bug label Jun 21, 2016
@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

Please recompile & test :)

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

ok

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

Not working - use xorg icon :(

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

screenshot_20160622_022113

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

Hmm, ok, switching to Plasma 5 (please wait)...

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

Ok. I'm clear all cache and icons too, restart plasma, convert png to svg and copy to system icons folder... but always show xorg icon

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

No problems (tried with CMake icon 😃)... Try to remove rm ~/.cache/icon-cache.kcache or maybe all files from cache directory and then restart Plasma.
qmplay2-plasma5-with-cmake-icon

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

delete all ~/.cache but not solved. convert svg to png (VLC icon), restart plasma. Please see on /usr/share/applications and hicolor vlc icon, but on launcher xorg
screenshot_20160622_024651

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

And what if you close QMPlay2? Still Xorg icon?

@varlesh
Copy link
Author

varlesh commented Jun 21, 2016

No, close - use system icon (VLC now)

@zaps166
Copy link
Owner

zaps166 commented Jun 21, 2016

I can't reproduce. Everything is OK on my Plasma5 and on Mate.
What if you do: sudo ln -s /usr/share/icons/hicolor/128x128/apps/QMPlay2.png /usr/share/icons/QMPlay2.png? Maybe it still remembers the old icon location /usr/share/icons/QMPlay2.png and tries to load non-existing file at runtime? Maybe it has another cache somewhere else?

@varlesh
Copy link
Author

varlesh commented Jun 22, 2016

I convert vlc.svg to vlc.png on gimp. Moved new QMPlay2.png to /usr/share/icons/breeze/apps/48/ and to /usr/share/icons/hicolor/128x128/apps/
On dolphin and KMenu show VLC icon, also if touch player icon on panel - show VLC icon too (player closed). Bur run player and show Xorg icon on panel

@varlesh
Copy link
Author

varlesh commented Jun 22, 2016

screenshot_20160622_030629
screenshot_20160622_030618

@zaps166
Copy link
Owner

zaps166 commented Jun 22, 2016

What icon do you have in tray (expand it, the indicator on the left of the temperature) if player is running?
What if you copy/move the QMPlay2.png to /usr/share/icons ?

@varlesh
Copy link
Author

varlesh commented Jun 22, 2016

on systemtray use vlc icon
screenshot_20160622_031053

@zaps166
Copy link
Owner

zaps166 commented Jun 22, 2016

The system tray icon is exactly the same icon as on taskbar (see f2facc5 - it uses the window icon). Something must be wrong with your KF5. Could you try on Xfce4, Mate or any other DE/WM? You can try to load openbox in Plasma5 yaourt -S openbox; openbox --replace and then try. Then go back to kwin kwin_x11 --replace from "Alt+F2" launcher. Maybe kwin5 has bug? If you are using Manjaro "stable" repo then you probably have old Qt 5.6.0. Qt 5.6.1 is much better than Qt 5.6.0 (less bugs).

@varlesh
Copy link
Author

varlesh commented Jun 22, 2016

It's strange because other Qt5-apps show system icon, example qbittorrent.
Ok i try this latter... and go now sleep :)

@zaps166
Copy link
Owner

zaps166 commented Jun 22, 2016

I think this is Kwin5 or Plasma5 bug (or something wrong with cache), because Qt loads tray icon from window icon and the tray icon is OK, but window icon is not OK on Plasma/Kwin (internally in Qt is OK).

@zaps166
Copy link
Owner

zaps166 commented Jun 22, 2016

Ok, mee too 😃 2:20 AM in Poland

Later (if it still will work bad) please try with openbox WM on Plasma5 :)

@varlesh
Copy link
Author

varlesh commented Jun 22, 2016

I'm check on openbox - use system icon on panel, it's OK. This bug Qt or Kwin. After upgrade Qt5 and Plasma check again. Thx for support :)

@zaps166
Copy link
Owner

zaps166 commented Jun 22, 2016

So probably Kwin5 bug (or unknown other cache) :)
According to #30 (comment) probably it has problem because of changed icon directory (qmplay2 and qmplay2-git). Sorry, but I can't help, this is out of scope...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants