Commit Graph

26 Commits

Author SHA1 Message Date
miruka
d0e77eb061 Increase messages line height again to 1.3 2019-08-17 23:54:32 -04:00
miruka
43f8f4131d Slightly increase messages line height 2019-08-17 15:49:33 -04:00
miruka
2bb3952225 Show last event time in RoomDelegate
Also respect locale for message times
2019-08-16 12:07:22 -04:00
miruka
3c35616eaa Remove copyright headers in code 2019-08-11 08:34:36 -04:00
miruka
67dde68126 Big performance refactoring & various improvements
Instead of passing all sorts of events for the JS to handle and manually
add to different data models, we now handle everything we can in Python.

For any change, the python models send a sync event with their
contents (no more than 4 times per second) to JS, and the QSyncable
library's JsonListModel takes care of converting it to a QML ListModel
and sending the appropriate signals.

The SortFilterProxyModel library is not used anymore, the only case
where we need to filter/sort something now is when the user interacts
with the "Filter rooms" or "Filter members" fields. These cases are
handled by a simple JS function.

We now keep separated room and timeline models for different accounts,
the previous approach of sharing all the data we could between accounts
created a lot of complications (local echoes, decrypted messages
replacing others, etc).

The users's own account profile changes are now hidden in the timeline.
On startup, if all events for a room were only own profile changes, more
events will be loaded.

Any kind of image format supported by Qt is now handled by the
pyotherside image provider, instead of just PNG/JPG.
SVGs which previously caused errors are supported as well.

The typing members bar paddings/margins are fixed.

The behavior of the avatar/"upload a profile picture" overlay is fixed.

Config files read from disk are now cached (TODO: make them reloadable
again).

Pylint is not used anymore because of all its annoying false warnings
and lack of understanding for dataclasses, it is replaced by flake8 with
a custom config and various plugins.

Debug mode is now considered on if the program was compiled with
the right option, instead of taking an argument from CLI.
When on, C++ will set a flag in the Window QML component.

The loading screen is now unloaded after the UI is ready, where
previously it just stayed in the background invisible and wasted CPU.

The overall refactoring and improvements make us now able to handle
rooms with thousand of members and no lazy-loading, where previously
everything would freeze and simply scrolling up to load past events
in any room would block the UI for a few seconds.
2019-08-11 08:27:53 -04:00
miruka
67e06aa739 Remove debug print 2019-07-21 18:26:53 -04:00
miruka
843d40ca26 Fix > parsing and local echo 2019-07-21 17:41:43 -04:00
miruka
459880903d Message stylesheet; turn "> ..." into greentext 2019-07-21 16:53:34 -04:00
miruka
3e1e924147 Fix messed up delegate positions on new message 2019-07-20 02:21:12 -04:00
miruka
0488a7dde8 Fix nameLabel binding loop 2019-07-20 01:35:25 -04:00
miruka
cea586120e Rework how messages and events are handled
- No more translatable, content_type, show_name_line attrs for
  TimelineEventReceived.
  Since they are UI concerns, they are handled directly in QML.

- Refactor the EventDelegate and get rid of errors when new items
  are added to the timeline

- Messages, events and emotes all combine correctly.

- No more 28px wide avatars for events, to make them uniform with
  messages.
2019-07-20 01:30:58 -04:00
miruka
4d32adaa41 Animate event side change 2019-07-18 07:22:41 -04:00
miruka
67efde9116 Show own events on right only under certain width 2019-07-18 06:33:09 -04:00
miruka
d2dfafb4e7 Standardize spacings 2019-07-16 05:29:47 -04:00
miruka
4b2cbffc83 Auto-set maximumLineCount for elide in HLabel 2019-07-16 04:47:56 -04:00
miruka
751a27157c Add account settings page
Display name change working
2019-07-13 20:15:20 -04:00
miruka
eeea0af4cd Change every QtQuick import versions to 2.12 2019-07-13 05:39:01 -04:00
miruka
0f6474532b Add LGPL license headers 2019-07-07 23:53:08 -04:00
miruka
683ee3e1cf Add HUserAvatar and HRoomAvatar components 2019-07-07 00:24:23 -04:00
miruka
d83508742c Replace HStyle singleton by global Theme in Window 2019-07-06 17:50:55 -04:00
miruka
ecd7768c70 Change how our own messages are displayed
Avatar and name won't be shown for our messages
(the avatar is still visible in sendbox), but they will have a different
background color.

Also make bottom UI elements 36px tall, for avatars to match size with
the rest of the UI.
2019-07-05 21:38:32 -04:00
miruka
22dfd83d32 Rename avatar/nameHue funcs to avatar/nameColor 2019-07-04 16:56:34 -04:00
miruka
63645b73a5 RoomDelegate subtitle, take only 1 arg for getUser 2019-07-04 00:28:13 -04:00
miruka
5fa2892fda Move various functions in QML code to new utils.js 2019-07-03 22:31:29 -04:00
miruka
441c9d0c1d Have different background for events and messages 2019-07-02 23:48:36 -04:00
miruka
f0c5afe8c7 Rename RoomEventList components 2019-07-02 22:29:09 -04:00