Commit Graph

30 Commits

Author SHA1 Message Date
miruka
1806ac6ac0 Color "upload profile picture" icon
Also fix hover zone to span the entire avatar rectangle
2019-08-28 18:47:04 -04:00
miruka
6cda69ad67 Restore icon colors 2019-08-28 18:21:13 -04:00
miruka
560981a97e Remove uneeded HRectangle component 2019-08-27 22:46:31 -04:00
miruka
3749d1e135 Allow pressing escape to cancel in edit profile 2019-08-22 10:22:21 -04:00
miruka
ed96409645 Split HButton components, add HMenu/HMenuItem 2019-08-21 15:45:13 -04:00
miruka
ce128d5ab5 Refactor HButton 2019-08-20 17:41:24 -04:00
miruka
109082c8d8 Use a Loader instead of StackView for pageStack 2019-08-19 15:38:45 -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
47d30352fa EditAccount header: match Display name field 2019-07-24 16:37:14 -04:00
miruka
c0b51b574c ui-settings: Rename write_aliases to writeAliases 2019-07-21 08:57:17 -04:00
miruka
a3e2233391 Fix window/content sizes for EditAccount page 2019-07-18 23:59:05 -04:00
miruka
93bc2ff5a9 Add multiaccount write-as alias account setting 2019-07-18 21:58:21 -04:00
miruka
ff7c2413df Change "Save" button to "Apply" in EditAccount 2019-07-18 20:58:38 -04:00
miruka
50930aec36 Fix profile cancel button not restoring avatar 2019-07-18 18:48:32 -04:00
miruka
1fa8b70359 ES5 → 7: Use for in/of and let 2019-07-18 05:18:13 -04:00
miruka
271b3e3829 Change all colors to use the new hsl(a) functions 2019-07-18 01:31:51 -04:00
miruka
fa61e8f0e3 Standard way of knowing if window "is wide" 2019-07-18 01:18:06 -04:00
miruka
902ac250b0 Fix file names to respect conventions
Important markdown/text files: UPPERCASE.ext
QML module dirs, qml files: PascalCase
Python module dirs, py files, js files: snake_case
Everything else (including icons): hyphen-case
2019-07-17 13:40:28 -04:00
miruka
29e21bc7c2 Fix avatar upload overlay overflow at small size 2019-07-16 11:48:57 -04:00
miruka
d2dfafb4e7 Standardize spacings 2019-07-16 05:29:47 -04:00
miruka
d5dd1292ff wrap/elide: use Layout.fillWidth when possible 2019-07-16 05:08:27 -04:00
miruka
6ae37dc31f Always center button text (for now) 2019-07-16 04:41:26 -04:00
miruka
aef777d853 Fix image selection and overlay bugs 2019-07-16 04:37:39 -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
83cc148cdc Prevent flicking page when it 100% fits in window 2019-07-15 18:54:21 -04:00
miruka
503252f1c7 Make edit account UI more scalable
Put content in flickable, reduce avatar height as needed.
The minimum supported resolution of the app should now be 240x120.
2019-07-15 17:43:53 -04:00
miruka
62056b6124 Avatar change working 2019-07-15 16:14:08 -04:00
miruka
751a27157c Add account settings page
Display name change working
2019-07-13 20:15:20 -04:00
miruka
6916039546 Add "Edit Account" interface skeleton 2019-07-13 05:34:58 -04:00