Replace the poorly implemented 2-in-1 "copy address" media event
menu option with:
- Copy <mediaType> address: visible for non-encrypted media, always
copies the http URL
- Copy local path: always visible for already downloaded media, even if
they were downloaded before mirage was started
This involved a refactoring to move all the media handling functions
(downloading, opening externally, etc) out of the Event delegates and
into the EventList, which manage keybinds instead.
This should also be better for performance since all these functions are
no longer duplicated for every Event in view.
Other user-noticable change: clicking on non-image media will
always download and open them no matter if the room is encrypted or not,
instead of opening non-encrypted files in browser like before. It will
be possible to still do that with an "open externally" command later.
Fix bug introduced in 11fb32:
When loading an encrypted thumbnail, QML lacks the decryption dict for
half a second at first.
When calling python like this, python calls the wrong matrix API
for fetching the encrypted thumbnail, and the added retry code
would be forever stuck.
The retry code has been moved to QML, and now works for all HImage.
Current features:
- Show scaled up thumbnail while the full image is loading
- Click to alternate between scaling mode (or reset zoom if not 1x)
- Click outside of image to close
- Double click to toggle fullscreen
- Middle click to open externally (also for thumbnail in timeline)
- Right click anywhere to close
- Ctrl+wheel to zoom
- Click-drag to pan when image larger than window
Will be used to show a preview before uploading image from clipboard.
Transforming the clipboard image to PNG (or any other real format) is
slow and freezes the GUI, with the provider we can display it directly.
If the room pane is below the default width (by user resizing or because
of narrow window), go to the room settings or a member profile will
automatically expand it as needed.
The pane goes back to its previous size once the settings/profile is
left.
If the window is narrow enough that expanding the pane normally would
reduce the timeline's width past its minimum, the pane is shown as an
overlay instead.
If the account passed to `saved_accounts.update()` doesn't exist in the
config file, return instead of failing with a KeyError.
An account can be absent from the file if "Remember my account" was
unchecked on login, or if the file hasn't been updated yet on disk after
login (race condition).
Enter/Return/Menu: open device menu
Space: toggle check device
Escape: uncheck all
Alt+R/F5: refresh device list
Alt+S/Delete: sign out checked or all sessions
<img> tags that either have a width and height (needed for QML to render
correctly) or the data-mx-emote attribute (if they have no width/height,
we assume 32x32) will be rendered inline.
QML's support for img tags with remote src URLs seems buggy on Qt 5.15
especially, not working sometimes. We need to download and cache these
images (like done for matrix media events), and use the local path in
the img's src.
- Refactor everything about HBox, and adapt all the pages and popups
that used it
- Replace HTabContainer by HTabbedBox
- Make boxes swippable
- Make esc presses in boxes click the cancel button
- Make all boxes and popups scrollable when needed
- Replace generic apply button icons in popups
- Fix tab focus for error and invite popups
- Rework (still WIP) the account settings page:
- Use the standard tabbed design of other pages
- Ditch the horizontal profile layout, hacky and impossible to extend
- Add real-time coloring for the display name field
- Implement a device list in account settings (Sessions, still WIP)
Pillow 0.7+ no longer requires separate installation of libraries like
libjpeg, zlib, etc, for common desktop architectures at least
(which is why we keep them in the INSTALL.md manual install commands).