Commit Graph

41 Commits

Author SHA1 Message Date
miruka
d353056db9 Fix scroll to top/bottom 2019-09-06 15:20:22 -04:00
miruka
f6a24ec020 Remove overshoot check for smartVerticalFlick()
Keyboard flicking feels better witohut rather than just abruptly
stopping or not doing anything if the user is already at the top/bottom
of the flickable.
2019-09-06 15:07:19 -04:00
miruka
922eac4ea9 Pseudo-clipboard safety modifications 2019-09-06 15:07:19 -04:00
miruka
131a20e9c5 Add context menu to copy selected messages 2019-09-06 15:06:35 -04:00
miruka
016f76167f Initial implementation of message selection 2019-09-06 15:06:35 -04:00
miruka
70b82b7b59 Add scroll to top/bottom keybinds 2019-08-30 13:40:56 -04:00
miruka
4587599cf5 Fix sending typing state when no configured alias 2019-08-30 10:49:41 -04:00
miruka
06d75a18fc Remove useless print 2019-08-30 10:33:58 -04:00
miruka
4ff3ebe255 Fix room subtitle for local echoes 2019-08-28 13:29:49 -04:00
miruka
8de26c11a1 HShortcutHandler & HShortcut components
Provide more powerful shortcuts handling than what's available with
QML's Shortcut component, notably being able to react differently to key
presses, releases and auto-repeats.
2019-08-22 13:03:26 -04:00
miruka
206f5494c8 Use hsluv for display names & remove hsl funcs 2019-08-21 12:43:07 -04:00
miruka
7624ce5fcb hsluv/hsl(a) functions: wrap around hue 2019-08-21 12:32:14 -04:00
miruka
1886303481 Fix member filtering 2019-08-21 12:17:12 -04:00
miruka
de4d984ded Use smart case for filters 2019-08-19 18:25:00 -04:00
miruka
165c1b797e Repair room filter, performance improvements
Chnaging delegate heights is a terrible idea that leads to graphic bugs.
Handle filtering (both room and accounts) and collapsing from a function
that sets the JsonListModel source.
2019-08-19 10:28:49 -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
7e9106ee9c Utils.hsla(): use py.callSync 2019-07-25 19:19:24 -04:00
miruka
ec27ecf498 Initial themes implementation, new default theme 2019-07-24 02:14:34 -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
1fa8b70359 ES5 → 7: Use for in/of and let 2019-07-18 05:18:13 -04:00
miruka
8a38274280 Make all JS functions and variables camelCase
According to conventions.
2019-07-18 04:48:34 -04:00
miruka
3939470679 Add "use strict" directive to all .js files 2019-07-18 04:38:22 -04:00
miruka
4920ff6212 ES5 → 7: Use function default parameters 2019-07-18 03:35:30 -04:00
miruka
8f53d2e018 Qt 5.12 ES5 → 7: Use "() =>" and array.includes 2019-07-18 03:13:34 -04:00
miruka
cf13315d4f Add normal hsl and hsla functions 2019-07-18 01:27:14 -04:00
miruka
73ecbaad10 Add upload avatar hover overlay
Also fix name colors and always use fit-crop mode for avatars.
2019-07-15 20:10:43 -04:00
miruka
751a27157c Add account settings page
Display name change working
2019-07-13 20:15:20 -04:00
miruka
861347ce64 Fix "tarfindId" sed rename mistakes 2019-07-08 13:24:05 -04:00
miruka
0f6474532b Add LGPL license headers 2019-07-07 23:53:08 -04:00
miruka
2170b16175 Rename users.getUser to users.find 2019-07-07 22:41:32 -04:00
miruka
47327c64cf Working filter field for room members 2019-07-07 05:50:42 -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
4c4603691f Working typing users bar 2019-07-05 19:54:16 -04:00
miruka
6b83d79f16 stripRoomName: don't return "" if name is just "#" 2019-07-04 17:11:00 -04:00
miruka
22dfd83d32 Rename avatar/nameHue funcs to avatar/nameColor 2019-07-04 16:56:34 -04:00
miruka
fde7f4aee6 Move models to their own files 2019-07-04 16:01:44 -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