Commit Graph

160 Commits

Author SHA1 Message Date
23rd d0d1d91ef3 [img-editor] Added simple highlight of selected tool. 2026-03-12 12:59:49 +04:00
23rd 91df896f8e [img-editor] Refined eraser brush algorithm. 2026-03-12 12:59:49 +04:00
23rd 537375b92b [img-editor] Added simple modes of brush for arrow / marker / eraser. 2026-03-12 12:59:49 +04:00
23rd a5a43dcc7f [img-editor] Added tool buttons in paint mode. 2026-03-12 12:59:49 +04:00
23rd d189b1966e [img-editor] Added simple palette with buttons. 2026-03-12 12:59:49 +04:00
23rd 4b521e687e [img-editor] Removed combined control for size and color. 2026-03-12 12:59:49 +04:00
23rd 6ed80c9706 [img-editor] Added dedicated brush size control. 2026-03-12 12:59:49 +04:00
23rd 898eebbf4b [img-editor] Fixed non-clickable bottom area by masking editor controls. 2026-03-12 12:59:49 +04:00
23rd c4847e752c [img-editor] Expanded paint canvas to fill editor window during zoom. 2026-03-12 12:59:49 +04:00
23rd 8aa09d32dc [img-editor] Fixed brush stroke start offset and spacing at high zoom.
Related commit: 7ce7b88a40.
2026-03-12 12:59:49 +04:00
23rd 00ef43657e [img-editor] Fixed crash on close by detaching viewport event filter. 2026-03-12 12:59:49 +04:00
23rd 7c5475e62a [img-editor] Added wheel zoom and middle-button pan for paint canvas. 2026-03-12 12:59:49 +04:00
23rd 6418af0ada Improved division by zero in photo editor stroke rendering calculations. 2025-12-22 17:56:54 +04:00
23rd eca8dfb0ec Renamed rpl::start_with_ with rpl::on_. 2025-12-10 21:28:33 +03:00
John Preston 03df5b8546 rpl::type_erased() -> rpl::type_erased. 2025-12-10 14:27:05 +04:00
23rd 7ce7b88a40 Implemented adaptive drawing algorithm with smoothing in image editor.
- Adaptive point filtering - zoom-based minimum distance (3px / zoom)
  prevents point overflow during fast movements.

- Speed-based pressure simulation - exponential smoothing (decay 0.95)
  creates variable line thickness: pressure = clamp(1.0 - speed * 0.1).

- Two-pass
  weighted averaging - smoothed = current * 0.5 + neighbors * 0.25
  eliminates jagged lines while preserving initial direction.

- Incremental rendering with 3-point overlap - draws only new segments,
  reduces complexity from O(n^2) to O(n).

- QPainterPath with quadratic Bezier curves - single fillPath() call
  instead of multiple drawEllipse().
2025-12-10 09:47:48 +03:00
John Preston 0b67fa65f2 Full upgradable variants preview. 2025-12-05 20:11:54 +04:00
John Preston b754ad5248 Use base::weak_qptr / base::make_weak. 2025-07-23 11:40:59 +04:00
Sean Wei 5a6a5fd4d1 Change const T&& parameters to T&& to enable proper move semantics
Previously some constructors/functions used `const T&&`, which prevents
calling the move constructor. This commit removes the `const` qualifier
so that `std::move` actually performs a move.
2025-06-27 20:50:08 +04:00
John Preston ded0936bc4 Fix arbitrary aspect in photo editor crop. 2025-02-13 20:20:14 +04:00
John Preston e05bb75b8a Allow sending videos with covers. 2025-02-12 17:24:24 +04:00
23rd ae17acdfd4 Removed include directive for ui_utility from rp_widget header. 2024-08-28 14:38:33 +03:00
23rd 1c223e570a Slightly improved code style for long equality expressions. 2024-04-15 11:20:30 +04:00
23rd d03d50ef0d Removed cIntRetinaFactor and cRetinaFactor. 2024-03-24 07:10:07 +03:00
23rd a1369aaad0 Added references to structured bindings since Apple clang supports them. 2024-01-16 11:18:55 +04:00
23rd baa99be6a5 Removed some unwanted include directives of lang_keys in header files. 2023-11-15 03:30:04 +03:00
23rd e98f56b0b7 Fixed aspect ratio of non-standard stickers in photo editor. 2023-11-06 12:41:15 +04:00
John Preston dd692f2d26 Use simplified TextStyle. 2023-10-13 10:08:29 +04:00
John Preston 2c5d990e1c Implement full theming of attachments in stories. 2023-07-20 07:20:08 +04:00
John Preston 65afa2c402 Detach ComposeControls from SessionController. 2023-05-17 15:51:52 +04:00
John Preston ff4af1b9bc Fix pasting images from Firefox on Windows.
Fixes #10564.

Together with the image data Firefox sets to the clipboard an URLs list
which has a path to local temp file, created from that image.

Reading images from disk is slower + sometimes the content of the file
is wrong so for this case we prefer to read the image data directly.
2023-03-08 16:10:36 +04:00
23rd a7e2de53f5 Moved out size of result file for userpic to public interface. 2023-02-02 22:12:31 +04:00
23rd f077c555e2 Moved out styles of ripples with shadowFg color to single place. 2023-02-02 22:12:31 +04:00
23rd dad9f4b87d Flipped icon for rotation button in photo editor. 2023-01-09 09:05:06 +04:00
John Preston 84288112fc Allow sending photos larger 1280 (experimental).
Improves #6520.
2023-01-02 14:26:41 +04:00
John Preston 17f40d6a1f Don't lose focus when showing image editor. 2022-12-28 13:05:23 +04:00
John Preston 2364b0ad4e Show additional information in userpic suggest / accept. 2022-12-26 14:24:07 +04:00
John Preston 1d7ad701b4 Implement blurred background for photo editor. 2022-12-26 14:24:07 +04:00
John Preston 9513aaa768 Allow accepting video userpic suggestions. 2022-12-26 14:24:07 +04:00
23rd a3a48a38c8 Replaced callback for box showing with dedicated class in photo editor. 2022-12-26 14:24:07 +04:00
John Preston ae819eb1a6 Open settings when done changing photo. 2022-12-26 14:24:05 +04:00
John Preston 48cf0a4382 Implement suggested profile photo message. 2022-12-26 14:24:05 +04:00
John Preston cb653df0f6 Support adaptive forum userpic rounding radius. 2022-12-05 16:18:10 +04:00
John Preston 0dd45de254 Remember scroll state between topic openings. 2022-11-03 16:29:40 +04:00
John Preston 749fb52113 Implement animated spoilers. 2022-09-18 16:52:30 +04:00
John Preston bc340d75c4 Insert / Copy emoji from pack preview. 2022-09-14 14:45:23 +04:00
Ilya Fedin e20840b4d4 Use KUrlMimeData for clipboard xdg-desktop-portal integration 2022-08-30 20:25:10 +04:00
John Preston f8e22210e7 Move Webm sticker to UnwrappedMedia. 2022-08-04 13:35:34 +03:00
John Preston 2d6008f6ca Fix custom emoji in edit caption / send files box. 2022-07-26 20:12:13 +03:00
John Preston 6dedf7c63e Update API scheme to layer 143. 2022-05-19 17:27:02 +04:00