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

Inkscape missing icons #228730

Open
tobiasBora opened this issue Apr 28, 2023 · 14 comments
Open

Inkscape missing icons #228730

tobiasBora opened this issue Apr 28, 2023 · 14 comments
Labels
0.kind: question Requests for a specific question to be answered

Comments

@tobiasBora
Copy link
Contributor

tobiasBora commented Apr 28, 2023

Describe the bug

Some icons are missing in Inkscape. Notably all the arrows:

image

the bottom-left part:

image

and most annoyingly, the text align options (left/right/center/…):

image

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install and run Inkscape

(tested with KDE plasma, if it matters, with dark breeze:
image)

Additional context

Notify maintainers

@jtojnar

Metadata

Tested originally on 2caf4ef (system using flake), but I just tried with:

nix run github:NixOs/nixpkgs#inkscape

today, same issue.

@tobiasBora tobiasBora added the 0.kind: bug Something is broken label Apr 28, 2023
@jtojnar
Copy link
Member

jtojnar commented Apr 28, 2023

It requires an icon theme containing icons like pan-down-symbolic and open-menu-symbolic, for example gnome.adwaita-icon-theme. Unfortunately, we cannot really specify such dependency in Nix.

@tobiasBora
Copy link
Contributor Author

tobiasBora commented Apr 29, 2023 via email

@jtojnar
Copy link
Member

jtojnar commented Apr 29, 2023

Not really, the selected icon theme depends on user configuration. At best you could create a dummy hicolor theme and fill it with icons, since most icon themes extend the empty hicolor theme. But you would need to come up with icons you want to use. This is especially hard since icon-naming-spec is dead nowadays – none of the icons used by Inkscape by default are listed there.

See also #43150 (comment) for more context.

@tobiasBora
Copy link
Contributor Author

tobiasBora commented Apr 29, 2023 via email

@tobiasBora
Copy link
Contributor Author

tobiasBora commented Apr 30, 2023 via email

@jtojnar
Copy link
Member

jtojnar commented Apr 30, 2023

it is possible by copying e.g. the adwaita theme in a hicolor folder (the hicolor theme being the fallback theme), and add this folder in XDG_DATA_DIRS in inkscape's wrapper, last in the list to be sure that we pick it when no better alternative exists. Am I missing something?

You are right, I forgot that the hicolor fallback is enforced and thought the themes had a different directory layout but that does not seem to be the case (any more). So we would only need to get rid of Adwaita’s index.theme file and replace it with hicolor’s one. Then only the size concern remains.

Actually we don't even need to move the theme to hicolor, it seems that unthemed icons (not contained in any theme, so I guess at the root of icons/?) are loaded as a fallback, so adding the icons/adwaita folder might be enough.

Yeah, unthemed icons are direct children of icons/ and pixmaps/ directories under XDG_DATA_DIRS. (Plus some other directories.) If you wanted to do this, you would need to change the directory structure (move all icons into icons/ directory) and presumably would not be able to use GTK icon cache.

If unthemed icons are loaded as a fallback will depend on whether LookupIcon or FindBestIcon method from the spec is used. Only the latter falls back to unthemed icons. Although, I guess, implementations can probably decide to fall back on unthemed icons even for the former.

That beeing sayed, I'm not sure to understand why the current fix works: if the current theme (and parents) do no contains the icon, the only fallback seems to be unthemed icons, i.e. outside any theme folder and directly at the root… and I guess adwaita does not contain such unthemed icons, no?

Yeah, no unthemed icons in Adwaita. What icon theme do you have selected in theming page of Preferences?

@tobiasBora
Copy link
Contributor Author

tobiasBora commented May 1, 2023

Ok thanks a lot. So I checked: adwaita icons seems to be 28M, while Inkscape is like 98M… so it is indeed non-negligible, but not crazy either. Another solution is to add only the few missing icons.

Also, I investigated, and I understand now a bit better what’s going wrong:

  • by default, I selected on the welcome screen a theme that seems to select Adwaita GTK’s theme, with icons from a "multicolor" theme, that does not provide the pan-* icons. But I can manually select the system theme instead (breeze in my case), that does provide the missing icons:

image

This way I don’t need to install adwaita to get the missing icons. Now, if I install adwaita, it seems like all theme now get the missing icons… that I still can’t explain…

@luzpaz
Copy link
Contributor

luzpaz commented Sep 26, 2023

Any progress on this ?

@luzpaz
Copy link
Contributor

luzpaz commented Nov 19, 2023

Heads up: #268483

@pinpox
Copy link
Member

pinpox commented Nov 27, 2023

Same problem. Is there a workaround that allows me to keep my current system icon theme and have something separate for inkscape?

@tobiasBora
Copy link
Contributor Author

@pinpox well if you install Adwaita, you can still use another theme for the system, and configure Thunderbird as explained above to use Adwaita's theme.

@blinry
Copy link
Contributor

blinry commented Dec 22, 2023

I had the same problem with Inkscape installed via Home Manger on Arch Linux, and for me, the problem was that I didn't have ~/.nix-profile/share in the exported variable XDG_DATA_DIRS, so GTK couldn't find the icon themes installed there. An easy way to achieve that for me was this setting in my home.nix:

xdg = {
  enable = true;
  systemDirs = {
    data = [ "$HOME/.nix-profile/share" ];
  };

Hope this will be helpful for other people stumbling over this issue! :)

@firstdorsal
Copy link

installing gnome.adwaita-icon-theme fixes the problem for me

@pinpox
Copy link
Member

pinpox commented Apr 20, 2024

installing gnome.adwaita-icon-theme fixes the problem for me

Then it should be added as dependency for the package

@jtojnar jtojnar added 0.kind: question Requests for a specific question to be answered and removed 0.kind: bug Something is broken labels May 25, 2024
@jtojnar jtojnar mentioned this issue May 25, 2024
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: question Requests for a specific question to be answered
Projects
None yet
Development

No branches or pull requests

6 participants