Commit Graph

64 Commits

Author SHA1 Message Date
Ilya Fedin 9fba9048af Use the same check for drag'n'drop image type as for file dialog
The code path when choosing an image in file dialog tries to read a QImage with Images::Read and then only checks that mime type starts with image/ in ValidPhotoForAlbum

Core::FileIsImage and QImageReader::canRead checks should provide the same behavior
2022-12-26 14:23:23 +04:00
23rd 4fabb3f2a2 Replaced some qsl with u""_q literal. 2022-11-30 17:17:14 +03:00
23rd 3467fe226f Added ability to send webp as compressed image. 2022-11-22 00:26:49 +00:00
Ilya Fedin 16669402cf Decrease the amount of clipboard data retrievation 2022-09-28 23:59:59 +04:00
Ilya Fedin e20840b4d4 Use KUrlMimeData for clipboard xdg-desktop-portal integration 2022-08-30 20:25:10 +04:00
John Preston 0df699a054 Allow drag-n-drop-ing files up to 4 GB.
Fixes #24657.
2022-06-22 18:56:01 +04:00
John Preston 0a81246502 Show correct error box when sending file > 4GB. 2022-06-16 13:48:11 +04:00
23rd 3959918fc5 Provided size of big file to premium limit box. 2022-06-07 08:16:39 +03:00
John Preston 6dedf7c63e Update API scheme to layer 143. 2022-05-19 17:27:02 +04:00
John Preston 8b7d2c880e Support rendering Webm videos with alpha. 2022-01-28 19:10:07 +03:00
John Preston 3ff17a8789 Refactor image transformation interfaces. 2022-01-21 15:33:44 +03:00
John Preston a2db9de4d7 Remove debug code. 2021-09-28 11:30:18 +04:00
John Preston 19ce1edc16 Use base::SafeRound instead of std::round.
Previous assertion violations because of NaN from std::round were
in video streaming, see commits 27d58ba07b, 8f5830d520.

Now the crashes happened in the ConvertScale() call from a background
thread when preparing an image from clipboard for sending to a chat.
2021-09-27 12:13:57 +04:00
John Preston da1945d0ca Add some more information for an assertion violation. 2021-09-25 22:49:51 +04:00
John Preston 132f127f3f Add some assertions to debug a crash. 2021-09-24 08:44:22 +04:00
23rd ddd5617043 Fixed processing GIF images as non-album files.
Fixed #16844.
2021-08-23 13:57:31 +03:00
23rd 852e46f0c9 Added filepath removal for modified images in photo editor.
Fixed #16791.
2021-08-12 02:35:53 +03:00
John Preston c79cd0b692 Use Images::Read instead of App::readImage. 2021-08-11 18:55:08 +03:00
23rd 96b40f43e9 Added ability to drag and drop images in photo editor. 2021-07-06 12:13:06 +03:00
23rd 948302cf02 Added setting to hide photo editor hint. 2021-07-06 12:13:06 +03:00
23rd 4d72d20398 Added ability to send modified images. 2021-07-06 12:13:04 +03:00
John Preston 93a88b54ad Fix sending images from clipboard.
Regression was introduced in ce1b94eb1.
2021-02-17 10:46:36 +04:00
John Preston ce1b94eb16 Send PDFs only as files.
Fixes #10294.
2021-02-05 13:18:11 +04:00
John Preston 0dc0f588c4 Don't offer sending .pdf-s as photos. 2020-12-24 13:52:38 +04:00
John Preston a614ccad97 Correctly check media when editing files. 2020-10-30 18:32:19 +03:00
John Preston 012ebdd15e Fix grouping of music files / just files. 2020-10-30 18:32:19 +03:00
John Preston 843fba61ee Allow adding any amount of files in SendFilesBox. 2020-10-30 18:32:19 +03:00
John Preston 0539cc9448 Add a way to recreate SendFilesBox content. 2020-10-30 18:32:19 +03:00
John Preston 202534575b Allow many previews in SendFilesBox. 2020-10-30 18:32:19 +03:00
John Preston 8d2fa313b7 Add setting for grouping files. 2020-10-30 18:32:19 +03:00
John Preston 64ac6b18bf Move SingleMediaPreview to td_ui. 2020-10-30 18:32:18 +03:00
John Preston b3b11bd9e7 Move PreparedFile/PreparedList to td_ui. 2020-10-30 18:32:18 +03:00
John Preston 39cf51c066 Move SendButton/EmojiButton to td_ui. 2020-10-30 18:32:18 +03:00
John Preston f0e1d2fd02 'base::optional_variant<' -> 'std::variant<v::null_t,' 2020-09-29 19:03:19 +03:00
23rd b71062561a Added ability to drag'n'drop videos in SendFilesBox. 2020-08-11 18:13:09 +04:00
23rd 4eaba39a7c Added drag'n'drop area to EditCaptionBox. 2020-07-20 21:44:07 +03:00
John Preston 2df5972f68 Raise file size limit to 2000 MB. 2020-07-08 10:07:01 +04:00
Nicholas Guriev 3c0694280f Fix -Wredundant-move 2020-07-01 00:17:05 +04:00
23rd d4f2b8dd0e Fixed ability to edit media with sticker.
Regression was introduced in efa4deef6a.
2020-06-05 19:46:34 +04:00
23rd 7b36c91e0d Fixed insertion of 11th image from clipboard in SendFilesBox. 2020-01-28 16:56:03 +03:00
23rd e266dc153b Implemented ability to add more than 1 file to albums via SendFilesBox. 2020-01-23 10:09:34 +03:00
23rd d1d5312ead Moved searching of sticker mimes to single place. 2020-01-23 10:09:33 +03:00
23rd 5f8c2f90ff Added button to add new files in SendFilesBox to album only. 2020-01-23 10:09:33 +03:00
23rd efa4deef6a Moved media editing via FileDialog to separate static method. 2020-01-23 10:09:33 +03:00
John Preston e2f54eb3e9 Move some style code to lib_ui. 2019-10-01 23:59:46 +03:00
John Preston 0c713a930a Remove app.h / facades.h from precompiled header. 2019-10-01 23:59:46 +03:00
John Preston 6343221d7b Remove many includes from stdafx.pch. 2019-09-06 19:31:07 +03:00
John Preston f2b3d9714f Fix sticker sending from clipboard. 2019-07-15 14:12:28 +02:00
John Preston 7034df49e9 Fix sending of .tgs stickers. 2019-07-03 13:03:01 +02:00
John Preston 096c310e0e Display consistent caption/comment placeholder.
After latest PRs regarding sticker sending with comment (#5500)
and album sending with caption (#4869) the input field placeholder
in SendFilesBox was inconsistent with the sending behaviour. Fix it.
2018-12-26 10:53:21 +04:00