Commit graph

45 commits

Author SHA1 Message Date
John Preston
6be424604f Add some more !isnan assertions. 2022-03-07 09:43:46 +04:00
John Preston
6956514425 Add some !isnan Assert-s in the animations engine. 2022-03-05 18:35:44 +04:00
John Preston
bd7c4ee06d Allow fractional stroke values in CrossAnimation. 2022-02-25 19:23:05 +03:00
John Preston
ec7af74351 Update some icons. 2022-02-25 16:08:47 +03:00
23rd
27d3b68ff4 Moved InterpolatedRect util to separated file. 2022-02-25 12:56:10 +03:00
23rd
d6cdc810c4 Renamed anim::interpolateF to anim::interpolateToF. 2022-02-25 12:56:10 +03:00
John Preston
d7b3a68351 Allow slowing down Animations::Simple globally. 2022-01-13 13:11:16 +03:00
John Preston
53e39e37eb Debug std::isnan assertion violation. 2021-11-02 09:37:16 +04:00
Ilya Fedin
8e5d35229a Simple replacements for Qt 6
QStringRef -> QStringView
QTextCursor constructor accepts a QTextDocument only
Some headers are moved, so paths are removed
QMatrix -> QTransform
Methods returning qsizetype are wrapped to int()s to allow compiler to deduce the type
2021-10-19 17:06:25 +04:00
John Preston
e62d92f655 Use base::SafeRound. 2021-09-27 12:12:54 +04:00
John Preston
ef633ec503 Fix PathShiftGradient colors with custom palettes. 2021-09-13 20:04:48 +03:00
Ilya Fedin
b8485c0d8a Fix -Wunused-variable warnings 2021-07-13 21:24:22 +03:00
John Preston
baf4d80867 Add Ui::PathShiftGradient effect. 2021-07-02 17:57:22 +03:00
John Preston
6bc9586644 Fix CrossLineAnimation with semi-transparent color. 2021-05-11 12:56:28 +04:00
John Preston
2b36c36dcb Allow fractional strokes in CrossLineAnimation. 2021-05-07 16:20:23 +04:00
John Preston
db1df1b4bd Allow gradients default constructors. 2021-04-26 13:44:28 +04:00
Loïc Molinari
f783243e13 Fix dangling timer event in animations manager
A race condition in the animations manager can leave a dangling
timerEvent() callback firing at a high frequency (>120 FPS) in the
main loop even though there is no active animations.

An update of the animations manager returns directly when there is no
active animations. If there is at least one active animation, it stops
the timer and schedules a new update before updating animations.
Depending on the Integration implementation, the scheduling call can
be postponed after the current update. The actual postponed call
unconditionally schedules an update by starting the timer. The issue
is that in the meantime the last remaining animation could have been
removed and, when the timer callback would be fired, the update would
return directly (since there is no active animations) without being
able to stop.

The explanation above ignores the updateQueued() cases of the
postponed call for simplicity. These cases do not result in infinite
updates like the timer case but still imply one useless (invoked)
update.

This fix adds a condition in the postponed call ensuring there is at
least one active animation before processing.

telegramdesktop/tdesktop#3640
telegramdesktop/tdesktop#4854
telegramdesktop/tdesktop#5436
2021-04-11 12:48:27 +03:00
John Preston
2696dbc959 Move CallMuteButton to td_ui for now. 2021-03-11 19:17:54 +04:00
23rd
6acc6f0483 Fixed invalidation of CrossLineAnimation. 2021-02-01 10:58:42 +03:00
23rd
52e1d6d740 Added ability to cache both colorized and default CrossLineAnimation. 2021-02-01 10:58:42 +03:00
23rd
dd4ddd69fd Added ability to pass different count of colors to gradients. 2020-12-17 15:57:46 +03:00
23rd
967b18290c Added ability to pass QGradientStops to gradients. 2020-12-17 15:57:46 +03:00
John Preston
e08a0de35d Use static polymorphism for gradients. 2020-12-14 18:47:33 +04:00
23rd
b0925f97d0 Moved InterpolateF to animation_value header. 2020-12-11 11:04:52 +03:00
23rd
d61e1a7bde Extracted common code for gradient classes. 2020-12-11 02:56:58 +03:00
23rd
5c66d1fa0a Wrapped AnimationsDisabled with rpl::variable. 2020-12-03 21:14:22 +03:00
John Preston
ab4ad89c4c Allow colorizing CrossLineAnimation. 2020-12-02 15:25:02 +03:00
23rd
ce7ad090f3 Added classes for gradient color animation with several states. 2020-12-01 14:54:24 +03:00
23rd
a175ae7c80 Moved gradient color animations to separate file. 2020-12-01 12:44:57 +03:00
23rd
cc1f597c6e Added ability to reverse lines in cross line animation. 2020-12-01 12:44:57 +03:00
23rd
baea14611e Added class for radial gradient color animation. 2020-11-30 15:09:28 +03:00
23rd
cc8e750c11 Added cross line animation to icon of mute button. 2020-11-30 15:09:27 +03:00
23rd
21eb3509bc Added icon cross line animation. 2020-11-30 15:09:27 +03:00
23rd
df8eed9576 Added implementation of blobs painter. 2020-11-30 15:09:27 +03:00
23rd
75171a0585 Added class for linear gradient color animation. 2020-11-30 15:09:27 +03:00
John Preston
d4c99701b5 Fix deprecation warnings on Qt 5.15.1. 2020-11-04 18:44:45 +03:00
Ilya Fedin
e27395cf18 Fix build with Qt 5.15 2020-06-01 18:32:44 +04:00
John Preston
ea176df168 Fix radial updates with disabled animations. 2020-01-22 11:10:53 +03:00
John Preston
f0e95ee933 Fix possible assertion violation in animations shutdown. 2019-12-31 13:48:16 +03:00
John Preston
21b976569a Draw radial animation in a static method. 2019-12-10 15:12:48 +03:00
John Preston
604f62599e Fix parsing entities from Ui::Text::String. 2019-12-10 10:36:25 +03:00
John Preston
7ed6610511 Allow querying slide animation state. 2019-09-26 09:53:57 +03:00
John Preston
f7c3e22cc9 Add Ui::SlideAnimation. 2019-09-26 09:53:53 +03:00
John Preston
f4904e5ec4 Add layer and box management. 2019-09-18 14:17:24 +03:00
John Preston
85c83003ca Initial commit. 2019-09-17 17:48:58 +03:00