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

Application icon replaced by orange back arrow #7

Closed
krs013 opened this issue Jul 13, 2017 · 7 comments
Closed

Application icon replaced by orange back arrow #7

krs013 opened this issue Jul 13, 2017 · 7 comments

Comments

@krs013
Copy link
Contributor

krs013 commented Jul 13, 2017

The code in client/client.py to set the window icon does not seem to have any effect. I may be misunderstanding what it is supposed to do, but I think the behavior we want requires a call to setWindowIcon on the QApplication instead of a QWidget.

See: https://stackoverflow.com/a/35865441/2102965

@krs013
Copy link
Contributor Author

krs013 commented Jul 13, 2017

Simply moving the line as suggested in the answer I linked fixes it on my Mac, but my Ubuntu VM doesn't work either way.

It turns out that (in a demo program) it works either way in Ubuntu, but there is some other problem that causes the icon to be replaced by an orange back arrow.

screen shot 2017-07-13 at 1 18 56 am

screen shot 2017-07-13 at 1 18 56 am

Has anyone else seen this, or is it just my system?

@Trilarion Trilarion added the bug label Jul 14, 2017
@Trilarion
Copy link
Owner

Thanks for reporting. Problems showing the application icon is clearly a bug.

QWidget has a setwindowicon function (http://doc.qt.io/qt-5/qwidget.html#windowIcon-prop) and it seems to result in the icon also been shown in the taskbar on Windows. It makes sense to set it for the whole application. As reported, Ubuntu still seems to have a problem.

In one of the next commits, I (or someone else) should set the icon on the application.

@Trilarion
Copy link
Owner

I can check with Ubuntu within the next five days, but not in the next two days (being abroad).

@krs013
Copy link
Contributor Author

krs013 commented Jul 14, 2017

Based on that, it looks like the best solution would be to set it for the application, since the widgets inherit the application icon when they don't have their own.

What really confuses me is where that orange arrow comes from. I've dropped debug traces in the code and checked the QIcon object returned by base.tools.load_ui_icon and it's the correct one, so I don't know how it turns out being that arrow. I can't even find an image that looks like that.

@Trilarion
Copy link
Owner

Icon is now set for the application in f3e105e. I could verify the problem with Ubuntu and will change the title of this issue accordingly.

@Trilarion Trilarion changed the title Window icon does not display properly Application icon replaced by orange back arrow Jul 18, 2017
@Trilarion
Copy link
Owner

Verified on Ubuntu 16.04 LTS with python3-pyqt5.

@Trilarion
Copy link
Owner

According to http://doc.qt.io/qt-5/appicon.html#setting-the-application-icon-on-common-linux-desktops and http://ubuntuhandbook.org/index.php/2014/03/how-to-change-an-application-icon-in-ubuntu-unity-tips/ the application icon is specified differently in Linux, mostly by Desktop entry specifications. One feature/effect is that application icons can change according to the theme.

This is probably not a bug then, just different behavior. The application icon under Linux needs to be added in a different way than for Windows and MacOs. I would include this as a task for creating a Linux package.

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

No branches or pull requests

2 participants