Update the author color generation. Now, instead of generating
an entire hex string based on the user id, the user id instead
is used to generate a hue value. After this hue value is created,
there is some logic to tweak first the lightness and then saturation
values to achieve a readable color (in contrast to the background).
This change makes it so that user colors will not vary as wildly
between the different themes.
The values still are not cached and still do not update
initially when the theme is changed. Both of these things
will be resolved.
Theme and Font Family settings will now correctly display the stored
settings when nheko is re-launched. Previously, these combo boxes
would default to the first thing in the combo box, even if that
wasn't what the user selected.
User can now select a font from the installed fonts on their system
This font currently will only be applied when nheko is restarted
(similar to how font size and scaling currently work). This will
be addressed in a future commit. Additionally, the dropdown
does not correctly select the previously-chosen user font, and
instead defaults to the first font available on the system
(alphabetically). This is similar to the issue with the 'Theme'
combo defaulting to 'Light' even when another theme is selected.
work regardless of the theme choices the user makes. The code
now incorporates the contrast between the background color and the
color generated by the user_name when picking colors. It currently
has two 'big' issues:
1. Colors are not cached. I am planning on adding a QHash for this
a little later. This should improve performance by not calculating
the color for the same users over and over and over again.
2. Theme changes do not trigger the colors to get refreshed.
Currently, you will have to switch to a different room and back
to get the colors to refresh.
This fixes#2, but reverts mujx#438. I do not think mujx#438 was a
valid issue, as it complained about the display of valid HTML on riot,
which speaks more to how Riot styles things than about an issue in
nheko itself.