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

[RFC] Create a Qml ImageProvider plugin for icons. #336

Open
ricardomv opened this issue Nov 22, 2015 · 8 comments
Open

[RFC] Create a Qml ImageProvider plugin for icons. #336

ricardomv opened this issue Nov 22, 2015 · 8 comments

Comments

@ricardomv
Copy link
Member

Would this work for us? i think it would be a bit more efficient having C++ code providing the icons instead of a javascript function / look up table. And maybe we can also discuss moving icons to a separate repository.

QQuickImageProvider
QML Plugin Example

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@marco-piccolino
Copy link
Contributor

+1 for image provider and separate repo

@iBelieve
Copy link
Member

We'd have to include a couple icons directly in qml-material (specifically, the back icon and the nav drawer icon), but I'm definitely up for moving icons to separate repository. We could even write a tool that takes some sort of file (maybe just a simple list) and imports icons into your project.

@ricardomv
Copy link
Member Author

I have some code for this i can create a branch later today

@iBelieve
Copy link
Member

@ricardomv that would be great, thanks 👍

@iBelieve
Copy link
Member

@ricardomv In #396, I've implemented using a icons.yml file, a downloader script, and QRC files. With that support, do you still think an image provider would be useful? I'm not sure if it would give use any benefits over directly accessing the QRC resources.

@ricardomv
Copy link
Member Author

Using a qrc file would mean the icons would be bundled in the binary making it a big file and increasing loading time, that's why an ImageProvider is a better solution because it only loads the icons as they are needed.

@ricardomv
Copy link
Member Author

The code for the image provider is very simple the only problem is the way we currently load icons is a bit messy sometimes we set the source sometimes the iconName property we need to have a standard way pick icons, i don't whats the standard way to do this in qt.
My implementation is in PR #362

@oKcerG
Copy link
Contributor

oKcerG commented Apr 22, 2016

In your PR, the icons need to be installed system wide, that's not something that can be done for all platforms (on mobile for examples).
The current way of doing (script + qrc ) is cross platform and only add size for icons actually used in the app.

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

4 participants