Introduced Style.svg() Style.png() Style.emoji() and
Style.icon() in Style.qml. Those should be used to
set the source in Images instead of using relative
paths. Usage:
Image {
source: Style.svg("check)
....
Also moved all Singletons inside a new "utils"
folder and made it a QML module, to use
import utils 1.0 instead of relative paths
Closes#3678
Due to historic reasons, conditionally assign a font size for the letter
identicon, based on whether or not the app's compact mode is active.
Compact mode has become the new default a while back and the component's
`isCompact` property isn't set anywhere in throughout the application,
resulting in `letterSize` to always be `21`, which is too big.
This commit removes the condition, defaulting to always having a letter size
of 15 pixels as designed.
Prior to this commit, communities without an image would render invisible
in the navigation bar of the application. To avoid this, we're now falling
back to our StatusLetterIdenticon component, which renders the first letter
of the community name with the color of the community.
When the `StatusLetterIdenticon` received a `#channel` name that starts
with `#`, it wouldn't properly determine the channel color because of
not stripping out the `#`.
This component introduces `StatusLetterIdenticon`, `StatusImageIdenticon`
and `StatusIdenticon`.
- `StatusLetterIdenticon` renders an identicon with a single letter based on a
name.
- `StatusImageIdenticon` renders an actual image based on an identicon URL
- `StatusIdenticon` is a composition of the former both, but with a loading mechanism
to decide which should be rendered
The commit also ensures all of these components are used respectively throughout
the application.