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

Icons missing for Ubuntu 19.10 #487

Closed
Dominic-Mayers opened this issue Dec 23, 2019 · 21 comments
Closed

Icons missing for Ubuntu 19.10 #487

Dominic-Mayers opened this issue Dec 23, 2019 · 21 comments

Comments

@Dominic-Mayers
Copy link

Not sure if it should be raised here or with Ubuntu, but the instruction to pick one of the themes in /usr/share/icons does not work with Ubuntu, at the least not with Ubuntu 19.10. It seems retext is looking for icon names such as document-save.png, etc. in some way (which I don't understand), but not all themes have these icons. In fact, in Ubuntu 19.10, only Humanity and HighContrast have the needed icons. So, perhaps there should be some instruction how to add icons in other themes or, at the least, mention that not all themes have the required icons. I had a nice result after setting Edit->Preferences->Icon theme name to Humanity.

@mitya57
Copy link
Member

mitya57 commented Dec 23, 2019

Not only Humanity and HighContrast have these icons. Most popular icon themes have them, e.g. Adwaita, Breeze, Oxygen and Elementary.

What is your desktop environment? What icons do the other applications (like file manager) use?

@Dominic-Mayers
Copy link
Author

I use a fresh minimal installation of Ubuntu 19.10, which comes by default with an updated gnome, with new icons, etc. How do I check which icons file manager uses?

@Dominic-Mayers
Copy link
Author

Dominic-Mayers commented Dec 23, 2019

I tried again Adwaita, with no luck. Actually, I knew it would not work, because I looked manually in the folder before and the icons were not there. However, I executed sudo apt install adwaita-icon-theme-full, closed and restarted retex and then it worked, except for the new document icon that was ugly in my opinion, but that is another story.

@Dominic-Mayers
Copy link
Author

Dominic-Mayers commented Dec 23, 2019

In my default installation, Breeze, Oxygen and Elementary were not available in the icons folder. So, I executed sudo apt list | grep icon-theme to see what was available in the repository and all three were available. I installed the breeze-icon-theme package which was in the list and it also worked with breeze.

@mitya57
Copy link
Member

mitya57 commented Dec 23, 2019

Ok, thanks for reporting this.

I will test with Ubuntu 19.10 virtual machine when I have time. Maybe later this week.

@MeNsaaH
Copy link

MeNsaaH commented Dec 23, 2019

I think the same goes for 19.04 or maybe it's the icon theme used. I'm on 19.04 using tela-dark icon theme which I got from github and it's not also showing any icons.

@Dominic-Mayers
Copy link
Author

I believe that it depends only on the theme. It just turns out that among the themes that are available in the default 19.10 icons folder (maybe also 19.04), only HighContrast and Humanity have the required icons.

BTW, I did not find the Tela theme in the default Ubuntu package repositories, but I installed it from https://github.com/vinceliuice/Tela-icon-theme. It has the required icons, at the least in some color variants, including Tela-dark.

@Dominic-Mayers
Copy link
Author

Dominic-Mayers commented Dec 24, 2019

@MeNsaaH , in which directory did you install the Tela theme? Retex did not recognize icons in the default location used by the installer. I had to explicitly specify the directory: I executed the ./install.sh -a -d /usr/share/icons command with root privilege. I suspect that retex recognizes some local icons directory, but I don't know which one.

@Dominic-Mayers
Copy link
Author

After some experiments, I see now that retext recognizes the local folder ~/.icons . So, the command to execute (without root privilege) his ./install.sh -d ~/.icons. This will install Tela and Tela-dark. You can also add a color variant, for example ./install.sh -d ~/.icons ubuntu will install Tela-ubuntu and Tela-ubuntu-dark.

@mitya57
Copy link
Member

mitya57 commented Dec 24, 2019

Ok, I managed to reproduce this and after some testing I decided to just force Humanity theme on Ubuntu.

For the record, here are two screenshots — how it looked before the fix:
Screenshot with Yaru theme

and how it looked when I tried to use the symbolic icons from Yaru theme:
Screenshot with Yaru theme (symbolic icons)

@Dominic-Mayers
Copy link
Author

Dominic-Mayers commented Dec 24, 2019

For the record, this fix just makes retex uses the Humanity icons when it is configured to use the Yaru icons. That may confuse some people, because when you configure a system to use Yaru icons you don't expect the system to use Humanity icons. As explained above, this was done because Yaru does not have the required icons. It has other icons, called symbolic icons, that have the same purpose as the required ones, but they are not very nice.

IMHO, this fix was not needed, because it was not an issue with retex: it is not the fault of retex if the icons are not available in all themes. Only a better documentation was needed together with a good default for the icon theme in the original configuration, ideally dependent upon the linux distribution.

@Dominic-Mayers
Copy link
Author

This fix also creates the issue that we have to close and restart retext before Yaru is mapped to Humanity, whereas with other icon themes we only have to hover above the icons and we see the new ones. In the case of switch to Yaru, with this fix, if we hover above the icons, we have icons as in the first screenshot above.

@mitya57
Copy link
Member

mitya57 commented Dec 24, 2019

IMHO, this fix was not needed

I disagree. The default Ubuntu setup is a very important target for us, and ReText should look fine out of the box on Ubuntu. So this fix was needed (at least for now, see below).

This fix also creates the issue that we have to close and restart retext before Yaru is mapped to Humanity

But why will you want to switch to Yaru explicitly? Most Yaru users are probably Ubuntu users, and they have it by default.

Anyway, I have just searched a bit and found ubuntu/yaru#1294 bug that is fixed in ubuntu/yaru#1600! So soon yaru will have normal document icons!

mitya57 added a commit that referenced this issue Dec 24, 2019
@mitya57
Copy link
Member

mitya57 commented Dec 24, 2019

I have now limited the workaround to Yaru versions that don't have the needed icons. With the next Yaru version, the workaround will not be applied and ReText will look like this (here I built the latest master):

Screenshot with Yaru master

Hope that is better.

@Dominic-Mayers
Copy link
Author

Dominic-Mayers commented Dec 24, 2019

Well, that's why I added that the default should be better. Ideally, I would have only changed the code that sets the default for Ubuntu, and only change the default when Yaru does not have the required icons. In this way, until after Yaru works, people will see Humanity as default for Ubuntu, not a false Yaru which is internally changed for Humanity. This will be a bit cleaner. For 99% of the users, it makes no difference, but for some users that start to play with the choice of icons, your approach might create confusion.

@Dominic-Mayers
Copy link
Author

Anyway, I like this application. Great job!

@mitya57
Copy link
Member

mitya57 commented Dec 24, 2019

Ideally, I would have only changed the code that sets the default for Ubuntu

There is no such code. The icon theme name is taken from system settings, which have Yaru on Ubuntu.

@Dominic-Mayers
Copy link
Author

Dominic-Mayers commented Dec 25, 2019

It's certainly possible to change the default and yet respect any choice that is made in the configuration file. But, given that it's a temporary work around, maybe there is no need to be too fanatic about respecting the settings in the configuration file. Anyway, to make the code behave a bit more nicely, you could add this (the last two lines) in config.py :

def applySettings(self):
		QIcon.setThemeName(globalSettings.iconTheme)
		if QIcon.themeName() == 'Yaru' and  not QIcon.hasThemeIcon('document-new'):
			QIcon.setThemeName('Humanity')

@Amr-Ibra
Copy link

Amr-Ibra commented Dec 27, 2019

Just a bit of context:
Symbolic action icons are the de-facto in a GNOME environment, full-colour icons are legacy, that's why Yaru theme didn't originally have any "legacy" full-colour action icons as its original author refused to do so.
The recent addition of the coloured 'document-.png' icons in Yaru is just a workaround for Qt apps in order not to appear broken under Yaru. And not all full-colour icons will be in Yaru, only the needed 'document-.png' ones.
I think also by default in a KDE Plasma environment, ReText also uses symbolic icons from the Breeze icon theme.

@mitya57
Copy link
Member

mitya57 commented Jan 5, 2020

@MaharishiCanada Ok, added the same workaround to applySettings. See 16f15df.

@mitya57
Copy link
Member

mitya57 commented Jan 5, 2020

@Amr-Ibra Well, ReText is not a GNOME application. The goal is to work with all desktop environments, so I use a written standard, not a “de-facto standard”. The written specification lists the document-* icons as “Standard Action Icons”, and it does not even mention the *-symbolic icon names.

So calling the standard icons “legacy” is wrong unless you update the specification.

KDE / Breeze are doing the right thing here: they have standard icon names, just their icons are symbolic (monochrome). That is fine.

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

No branches or pull requests

4 participants