tibirna / qgit

Official git repository for QGit.
Other
174 stars 68 forks source link

Use system icons under linux #13

Closed adrianofoschi closed 6 years ago

adrianofoschi commented 6 years ago

Is possibile to use system icons under linux? Tipically adwaita under gnome and breeze under KDE Plasma.

Thanks you

tibirna commented 6 years ago

Not presently. I intended for a long time to better integrate qgit with the environment (essentially look and feel and session support). Supporting DE icons requires quite a bit of coding (detecting DE kind and version, extracting icon paths, gathering info on icon names etc.). It's doable but will require some time. Thanks for the suggestion. I'll look into it when possible.

peterhoeg commented 6 years ago

I just came here to open an issue for the very same thing so there's definitely a +1 from here. Doesn't Qt already provide a lot of the support for at least standardising the icons? https://github.com/F1ash/qt-virt-manager/issues/19

filiperinaldi commented 6 years ago

QGit targets Windows and MacOS. The same complications pointed by @F1ash in qt-virt-manager#19 applies to QGit. BTW, I'm working on a patch to replace QGit's icons though whether Tibirna will accept it is another story ;-) Check the branch prosecco for this and other changes I'm working on: https://github.com/filiperinaldi/qgit/tree/prosecco

mwoehlke commented 6 years ago

Um... Qt has integrated icon theme support. I don't know how it works on not-Linux, but on Linux you should be able to just ask Qt to load theme icons by name. No "detecting DE kind and version, extracting icon paths" needed. (Maybe "gathering info on icon names", but that's a human task — go read the icon name spec — not a code task.)

peterhoeg commented 6 years ago

If the icons are referenced by their standard name and no icon by that name is supplied with qgit, Qt will load from the global theme at least on Linux. That means that the icons provided with qgit should be:

a) For non-linux platforms b) If a standard icon does not exist c) If a standard icon needs to be overridden

mwoehlke commented 6 years ago

I haven't checked (because I have an icon theme), but the impression I get from designer is that if you specify both a resource and a theme icon, you'll get the theme icon if available, and the resource otherwise. This would imply all that is needed is to specify the theme icons.

I have a branch for that, locally, but I'm waiting on my other PR (which is a build fix for my setup) to be accepted.

filiperinaldi commented 6 years ago

Hi @mwoehlke, whilst your PR is pending, can you push your icon theme patch into a branch in your kgit repo? I'm curious to see how it plays with my #55 patch.

mwoehlke commented 6 years ago

https://github.com/mwoehlke/kgit/tree/use-theme-icons

Whee! Um... poorly... but mainly because git is going to fall flat on its face trying to deal with the "conflicts". I don't think the two branches actually trip over each other, aside from needing to touch code that is close enough together to give git fits...