Add placeholder UI for showing replies in the text entry widget.
Existing quoting capability has been removed (Temporarily), as
it was replaced with the new reply capability. Replies sent from
nheko do not currently appear correctly in the timeline (this
will be fixed in a future commit).
Parsing html as xml has inherent problems, most notable there are many
matrix clients that don't escape ampersands in urls of mx-replies, etc.
(See issue #18)
This also removes the replacement of <mx-reply> as it isn't strictly
needed.
Also the QRegExp is replaced with the Qt5 QRegularExpression for
perfomance and because it supports lookahead and lookbehind.
I'm pretty sure that the original code also replaced href="" with
href=\"\", which was probably wrong, but I'm not to sure about that.
Fixes#18
Colors are generated asynchronously now and the TimelineItem is
updated when the color generation finishes. This allows the UI
to stay responsive while new colors are being generated.
When opening images in the full-screen overlay, there is now
a download button next to the close button. This button utilizes
the same functionality as the right-click->save image button.
Restored the emoji picker, but it now falls back to the system
instead of forcing Emoji One. The allows users to user the
picker for convenience, but doesn't enforce the emoji style on them.
Add initial loading of qt jdenticon plugin:
https://github.com/redsky17/qt-jdenticon
Currently, the library's functionality has not been integrated
into the rest of nheko. Next step is to add a configuration
item in the User Settings and use the plugin to generate
avatars for users without their own picture. These avatars
should be cached in the Cache object.
User colors are now stored in cache. This is consistent
with other similar variables. I think there's a bug
right now where it doesn't properly refresh colors
for the TimeLineItem when the theme is changed.
When user is mentioned (via matrix 'highlight_count'), inactive
rooms will use a different color for the notification circle than
when only general unread messages exist.
Author color is now cached so that it will not be re-calculated
each time a new message is posted. This cache gets cleared when
the theme is changed.
Additionally, the author color is now automatically refreshed
when the theme is changed, fixing the issue where you had to
change rooms before the colors would switch.
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.