Introduce ImageProvider class#42
Conversation
promag
left a comment
There was a problem hiding this comment.
Concept ACK. This is the correct way of exposing the dynamically generated icon based on the chain.
However, I wonder if we want to instead ship with an SVG for each chain?
Does using SVG make |
|
Something like |
|
Let's discuss whether we want to use SVG. Qt support is detailed at https://doc.qt.io/qt-5/svgrendering.html. |
It should work for any image, even non-svg.
https://doc.qt.io/qt-5.12/qquickimageprovider.html#image-caching |
jarolrod
left a comment
There was a problem hiding this comment.
@Bosch-0 has an opinion on the usage of SVG, per Icon Policy Documentation:
"Both an icon source file, in Scalable Vector Graphics (SVG) format,
and an optimized production file, in Portable Network Graphics (PNG) format"
"SVGs are used as source files because they can scale while retaining image quality."
Being based on OpenGL and hardware acceleration, the Qt Quick framework could have a native support for SVG images without any performance penalties. Unfortunately, I have no enough expertise in this area for now. The only drawback is introducing a new Qt SVG module. |
|
Rebased after the recent sync. |
Github-Pull: bitcoin-core#42 Rebased-From: 5efe6dc
Github-Pull: bitcoin-core#42 Rebased-From: a9d9fa7
Github-Pull: bitcoin-core#42 Rebased-From: b7171c8
Github-Pull: bitcoin-core#42 Rebased-From: 5efe6dc
Github-Pull: bitcoin-core#42 Rebased-From: a9d9fa7
Github-Pull: bitcoin-core#42 Rebased-From: b7171c8
Github-Pull: bitcoin-core#42 Rebased-From: 5efe6dc
Github-Pull: bitcoin-core#42 Rebased-From: a9d9fa7
Github-Pull: bitcoin-core#42 Rebased-From: b7171c8
Github-Pull: bitcoin-core#42 Rebased-From: 5efe6dc
Github-Pull: bitcoin-core#42 Rebased-From: a9d9fa7
Github-Pull: bitcoin-core#42 Rebased-From: b7171c8
Github-Pull: bitcoin-core#42 Rebased-From: a9d9fa7
Github-Pull: bitcoin-core#42 Rebased-From: b7171c8
Github-Pull: bitcoin-core#42 Rebased-From: 5efe6dc
Github-Pull: bitcoin-core#42 Rebased-From: a9d9fa7
Github-Pull: bitcoin-core#42 Rebased-From: b7171c8
93d0475 qml: Add a demo Image object (Hennadii Stepanov) 8c56aa5 qml: Integrate ImageProvider into qml/bitcoin.cpp (Hennadii Stepanov) b3e7cda qml: Add imageprovider module (Hennadii Stepanov) Pull request description: The new `ImageProvider` class allows images in QML to be loaded using `QPixmap`s. The last commit is a demo for our fellow designers. For testing this PR one can run `bitcoin-qt` with different values of the `-chain=...` command-line option. ACKs for top commit: promag: Code review ACK 93d0475, tested but in a different branch. Tree-SHA512: aa8f65f3b4557d54b134e36ce07df097caa87be45d7ff80f164f55cae5833ab0c2ec777ee79f3b9c0b2b821923bc8f36dc5c07e402f44e1b77282df52203cb36
93d04750e5e5551232c9ddb07216a942839c37c2 qml: Add a demo Image object (Hennadii Stepanov)
8c56aa5d1266510ce68e31fa971a59ef15ce1b04 qml: Integrate ImageProvider into qml/bitcoin.cpp (Hennadii Stepanov)
b3e7cda2ffda7df4279b31ac980b29579bfaa51d qml: Add imageprovider module (Hennadii Stepanov)
Pull request description:
The new `ImageProvider` class allows images in QML to be loaded using `QPixmap`s.
The last commit is a demo for our fellow designers.
For testing this PR one can run `bitcoin-qt` with different values of the `-chain=...` command-line option.
ACKs for top commit:
promag:
Code review ACK 93d04750e5e5551232c9ddb07216a942839c37c2, tested but in a different branch.
Tree-SHA512: aa8f65f3b4557d54b134e36ce07df097caa87be45d7ff80f164f55cae5833ab0c2ec777ee79f3b9c0b2b821923bc8f36dc5c07e402f44e1b77282df52203cb36
The new
ImageProviderclass allows images in QML to be loaded usingQPixmaps.The last commit is a demo for our fellow designers.
For testing this PR one can run
bitcoin-qtwith different values of the-chain=...command-line option.