This makes it so that we consistently start with the same values after
having cleared a ChannelView.
Example place where this happens: UserInfoPopup when user messages are
loaded and refreshed
This ensures that the layout will survive for the lifetime of the menu,
so any of the menu actions can with confidence do things with the
layout, not having to worry whether it's dead or not.
This means that the user, while having the message menu open, could have
one extra MessageLayout alive. I have ensured that when the menu dies
the reference to the shared pointer dies with it.
There's a Refresh button added to the popup to refresh the users messages in the popup. Not automatic now while we figure out how fast/slow it would be.
Co-authored-by: dnsge <sagedanielr@gmail.com>
This feature is off by default and can be enabled in the settings with the "Show link thumbnail" setting. This feature also requires the "Show link info when hovering" setting to be enabled.
thumbnails support is only there for direct image links, twitch clips, and youtube links. can be expanded in the future in the /api repo
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit adds support for uploading images to i.nuuls.com from clipboard or by dragging an image into a split.
Documentation for how to self-host the image uploader is available in ENV.md
By default, you will be asked before an image upload takes place. There's an option in the dialog to not be asked again, if that option is chosen you can revert that choice in the settings dialog.
* ChannelView: Rename mouse event related members
This is more in line with the naming of the other members as well as
future members.
* ChannelView: Add ability to scroll with middle mouse button
* Add scrolling resources
* Use custom icons for scroll cursor
* Slightly refactor scrolling logic
* Respect screen scaling when calculating scroll offset
* Nicer scrolling UX
This change allows scrolling to be feel smoother when close to the
starting point.
* Add scrolling with keeping middle mouse pressed
This mimics the behavior of browsers as well.
* Refactor ChannelView::enableScrolling
* Disable drag-scrolling on left or right click
Since #1320, subscription messages are treated as highlights in order to
allow customization. This caused subscription messages to highlight the
split(s) the message was received in. This is not intended behavior.
This commit fixes the issue by additionally checking if the
`Subscription` flag is set on a highlighted message.
* Support for user-defined sounds and colors
* Make color & sound columns selectable
* Add custom row for subscription highlights
* Add subscriptions to custom highlights and centrally manage highlight colors
* Dynamically update message highlight colors
* Introduce crossPlatformCopy()
It sets the text of the clipboard and also syncs it with the selection
clipboard if it is supported. Such behaviour is pretty common for X11
application on Unix-like Operating Systems.
* Fix clang-format remarks
* Fix weird clang-format config discrepancy between my machine and CI
* Remove clipboard argument from crossPlatformCopy
* Fix clang-format remarks
Things changed:
- make getImageFileFormat case insensitive
- use QTextEdit::dragEnterEvent instead of QAbstractScrollArea::dragEnterEvent,
- Make dragEnterEvent() and dropEvent() overrides.
This includes:
- NuulsUploader.cpp
- changing upload delay to a #define
- moving png conversion code to `boost::optional<QByteArray> convertToPng(QImage image)`
- in uploadImageToNuuls: moving content type definition to a variable, move things around a bit to eliminate an if
- in upload: adding a comment about `source->hasUrls()` and `source->urls()`, change `uploadQueue.size()` to `!uploadQueue.empty()`
- ResizingTextEdit.cpp
- changing #include order
While tab-completing user names already respected the setting for
mentions with commas, right-clicking user names did not.
This commit adds the missing check in ChannelView::handleMouseClick.