From 326342420d2a8217025ee73f41c1a34c3fe96730 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 8 Oct 2020 17:38:17 +0300 Subject: [PATCH] Added animation of voice recording lock with dummy lock icons. --- .../Resources/icons/lock/record_lock_body.png | Bin 0 -> 107 bytes .../icons/lock/record_lock_body@2x.png | Bin 0 -> 122 bytes .../icons/lock/record_lock_body@3x.png | Bin 0 -> 176 bytes .../icons/lock/record_lock_body_shadow.png | Bin 0 -> 122 bytes .../icons/lock/record_lock_body_shadow@2x.png | Bin 0 -> 199 bytes .../icons/lock/record_lock_body_shadow@3x.png | Bin 0 -> 341 bytes .../icons/lock/record_lock_bottom.png | Bin 0 -> 369 bytes .../icons/lock/record_lock_bottom@2x.png | Bin 0 -> 657 bytes .../icons/lock/record_lock_bottom@3x.png | Bin 0 -> 1012 bytes .../icons/lock/record_lock_bottom_shadow.png | Bin 0 -> 576 bytes .../lock/record_lock_bottom_shadow@2x.png | Bin 0 -> 2265 bytes .../lock/record_lock_bottom_shadow@3x.png | Bin 0 -> 4705 bytes .../Resources/icons/lock/record_lock_top.png | Bin 0 -> 359 bytes .../icons/lock/record_lock_top@2x.png | Bin 0 -> 661 bytes .../icons/lock/record_lock_top@3x.png | Bin 0 -> 1010 bytes .../icons/lock/record_lock_top_shadow.png | Bin 0 -> 557 bytes .../icons/lock/record_lock_top_shadow@2x.png | Bin 0 -> 2244 bytes .../icons/lock/record_lock_top_shadow@3x.png | Bin 0 -> 4604 bytes .../SourceFiles/history/history_widget.cpp | 2 +- .../history_view_voice_record_bar.cpp | 99 ++++++++++++++++-- Telegram/SourceFiles/ui/chat/chat.style | 16 ++- 21 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 Telegram/Resources/icons/lock/record_lock_body.png create mode 100644 Telegram/Resources/icons/lock/record_lock_body@2x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_body@3x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_body_shadow.png create mode 100644 Telegram/Resources/icons/lock/record_lock_body_shadow@2x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_body_shadow@3x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_bottom.png create mode 100644 Telegram/Resources/icons/lock/record_lock_bottom@2x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_bottom@3x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_bottom_shadow.png create mode 100644 Telegram/Resources/icons/lock/record_lock_bottom_shadow@2x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_bottom_shadow@3x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_top.png create mode 100644 Telegram/Resources/icons/lock/record_lock_top@2x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_top@3x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_top_shadow.png create mode 100644 Telegram/Resources/icons/lock/record_lock_top_shadow@2x.png create mode 100644 Telegram/Resources/icons/lock/record_lock_top_shadow@3x.png diff --git a/Telegram/Resources/icons/lock/record_lock_body.png b/Telegram/Resources/icons/lock/record_lock_body.png new file mode 100644 index 0000000000000000000000000000000000000000..6204b88ce44654acc312fcb73389f27b3dda9807 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0vp^IzY_C!2~4NIII)^Qk(@Ik;M!QddeWoSh3W;3@9k; z>EaktaVt3?A>qfLpP&CTGC8c4RCw_B_jl&k91IF?er3L9C}069WbkzLb6Mw<&;$Ve CE*@L} literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_body@2x.png b/Telegram/Resources/icons/lock/record_lock_body@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..cf955e2914fe6d14b625be80f406dff2084a863f GIT binary patch literal 122 zcmeAS@N?(olHy`uVBq!ia0vp^5kSns!2~2*cjvzcQk(@Ik;M!QddeWoSh3W;3@E7M z>EaktaVt52q1k`F-Cy~M4?aIX&vW9ze-1Vc#*aYu#Ri5(^Za`~AJ#B39NYD}#WRED QH&7pgr>mdKI;Vst0GTQ$zyJUM literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_body@3x.png b/Telegram/Resources/icons/lock/record_lock_body@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..1da493f530811593190d65746028aca617b5d1e4 GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^EkMl1!2~3G;}$9dDb50q$YKTtJs?|8nXzK2eHlgoZ|bdAmRI ztR?IR64DQ_%(ttR;+6W#j+S3j3^P6@AiB1ZrK literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_body_shadow@2x.png b/Telegram/Resources/icons/lock/record_lock_body_shadow@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..3b01ea846d4ba0f185d942490c5c4856bfa24cf5 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^89>a!!2~4Vdc3_3q&N#aB8wRq^pruEv0|xx8Bnm& z)5S5Q;?~nk2YDF;1zHnDFLYe!U!cb+C8Q;2bzmRUw}kIj@9o;(pEvksc5dgCOA^9P z8cV<2yB^hk-~fwQ%7KIKEK3r;g9O)XH9QveS|a(qucFM115G?TiunX5JSw(`SvDmq td&!}*mX7BvtKV321{*1fc-J2K!6_GvkGky!dYcZ}A=J zJtRqb{61Nh6-Ci?-L~x@2+}mIs;cX{X_~feyRPdgcEf;$7i6dbhaG$p5P}>;`6Jm+ z(0`+H{%Jn#E1^zR$IAVUo}>`@fCu1g4Vd?u=Cnq1^=p65-| z48yQ2%W)in{=UHrGSq;>9>=lgd4%|6R4#J2D2ldi$8i)<@7{Ty>$*Y>cv+T7lK8%F nS(c`0BC3e`MpW^Bzdz~={`1fTlQJPq00000NkvXXu0mjf;{A)_ literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_bottom.png b/Telegram/Resources/icons/lock/record_lock_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..8be9d5e19ed3df9ea6edea42c605cab82e866671 GIT binary patch literal 369 zcmV-%0gnEOP)YnZbaAh!_RjFB9{JyEX!3@9c6$h1kxQ~`-EZme*=WJ~$i>Z@fZZSuU4+ zT3D~wCK2=boKF#kVVFcrCKEnI%w{u_h;FybrwC2cOd?cOQLn?xvz!lwuXH;G86 z(|n3RaFd8=G|Hz41g8@giv@2M5Sh+tG#b2#K;#P|BuU~;1R`G$Aqc|pc;v?d!iGX2 zx`?jp{D?qU`VLu^`4N%N=f4%<_xpFd9S;@|6JhBGIO(-dJL_{qQDlC}M8J4FPFLx4 zI&6zTK)QuQBEj%QfoREOl5V6@sjw=dTCLLU1cSlVYQ>%fghDj>6-@RN2t~ie<#LTi zBbF>64nmOyVzJm}vth#mf*=lACYQ^xAp$|@PD-Vc(=8wZ-4E`oR;%S)3+;B>;?i)A z*Xtb&22QkqvQa!e5In1m$75$%K*3iYF|FbA`7}*)iUpL4g6TK*UF?RFOmg_m!0q5zbEV(7Jm z!{J)3_L99EOp2*d0NICBDuo{Ik9XWKDcKWI6wBrEQ*W02ey^%3CL;S22n1wV)^+`X z_X~!?fEX5olj9HsL6W3;y>9uP1DuG{F$jhtHi$$bnM_7e6kOQ7UT->`8iujmZa)L# r1HR(Ne!q_cip3%h#wqmAKd<2(0y9^$CoXzt00000NkvXXu0mjf52+w# literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_bottom@3x.png b/Telegram/Resources/icons/lock/record_lock_bottom@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..bd1cd6a8a296d49a9a9bf0ff58c41640bfc5fbf8 GIT binary patch literal 1012 zcmV!x$7FuWr(ZU!@ZKc;jjkiW^)x=II3?#M+ z`~Yt>`UfkdBjHjn3s?iU$n}l(He@`{~fp(KHN~IFj=;!+S+9Zs#voosE&*|x@Nf?<-hHCV4 zbaZ4A#@gB%)#wM>O~RO+ouwN6K)Xp8qobo#qaSED2_qVfQjLC~T}*j=e54(nK)BQ* zpU+c}P9VHy82mxyiJwwc#>U1dNGA|pGmN&jw$IN`I?@AFx3;#*H=LiJQp#eySYWb0^tu4w@4J3;d`uqDSOEr*eDGb9f zZf|etOC8V)$zqZD`FSc+2lR?{!r}1y`#Y_v0Ait6Y;kaKKyfO7Sg}h_PY;JiR1AUi z_V!90WV2c7bC+B$C-o7J$9ZtLdsy`K^-0}u{f>(qA0LYoVzJoA#|J$+2O1$$9J0B& zNtMolMsZF{OUuK<18q710z;vYxWeS*B!xNw0>wp6PEP2wKA=wAB@&60%VnCi3#37v zxK1jSqFlQ`nkZs_f1iG>16`tyU@&-fbw$fofGFq^rF3+3@Z@3TRMFYlDH<3Y9OP`r zH$V;)i8iLDrYOA@)6>(UnT3S~djHDe;-WMJ4qGW1fT|C}Fm`r!m_Ze&u(9StQ63u` z8%zSnM1zyy`J)QDFP>s%X2yrpQ0Ou`E*@lPXvkOBgXrw=@UVCmT%TWFUiu*kbQ7Hw zj}r_A_xARhegshYxRZ+{lgXz1%0j0Uj*6=z5{Wd~{2;ocWTr?P6B83nu$}>3aCsiP zQG`MvToe7$fnJo2;$2(Y;SsvJx-yx}FIq2(Qc*C)Jk i_+ZWd0VISFVu!y_Fv)P)Kp4va0000 literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_bottom_shadow.png b/Telegram/Resources/icons/lock/record_lock_bottom_shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..efa0930639db7a235b4a5404120334dafdfc679f GIT binary patch literal 576 zcmV-G0>Ax2&(>B7r7=kSU!` zPbQOJ8qPG$e!u^!aD%}hl}bs&C6h_pwoj*%`eZ;I$02|;Ts$7{bUKH_L47!&pa~!i z7mY@%)#`S;RUZy0XaY#Xg+if9rLtPB)Q1BKngHU4I4{HDP<=R{w~p$UVzF4W+1%}R zDwBZ&3fd)HFc`EfYq?yi3NkT7f`-Qr7GBo_Zl;4gwH3ahJGqa=F}iJU$+e&q#(X<{(_| zHkou?FPF=++06HR7-EY#2=TBYkw~dj8jVIi9$u_4#1?b$LxscPY&Og0@a249f)$3? z3SY#wVB6N~^~GZG@DehS>5WDMs|WYljq__5Mx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D4?{h?xTDCqJ4ni zVUGc|kd7OFrG6l$2CdR8&$bDlF_f-c($i)N9FMA93;V znVy`qAACJEH8nh3;sM)jv)=1=v-gGNdN5FVG(pcgW5g(N9pm$^QXEMlb3B literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_bottom_shadow@3x.png b/Telegram/Resources/icons/lock/record_lock_bottom_shadow@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..5421949809ff69580454065f6ba8ba7d618d93a8 GIT binary patch literal 4705 zcmai22T+q+(+*9%(vcudA%G&0-UOtEL=t)^ib#iGh*aqU3Iq{C??C|}ia^kS^dbr> zy-B-tq^dMgq&NQ;%Rl#iGv9ofIeBN^$vL}c_t|}(O_Y&=Hq!~76CeIZ-MP()D0O&)tr-QBSR8jFOoU^kM_Pqc+Aky&%*p%IjU0y*} zwydPYh`nMg8fRxWy}Z1mIQBgbJTKIdiRWC%5zj$tau@X3`4rhD8!OHrz{X#LT6`9S<#^yt3 zXJ>D3Z%>aT6p90Wd!swEkV0`9e0{j9ODc||8ouQB1(dPf*4i2w7iV4V0r5n5L++Q7 za9Hf;g@ud<50n)Zw|93bR&~BxUncSmvdGV#xi~xTeD6^|OEn-3Vz3r?q!z5Ksv0~| z>%+h)MpX8J!UX6^=g%(o8>&AqD!OTJZ}0BDIy+nD)b*geynKIue`%=r!>i!Ec=f{s zTBGEGDY~_&lOnz=qhM}sCHF}cVU6Q+8XOqJU~jLqf@tm0F2x2&zLaX1_tPWv?x1WC}MBjIk|?MH~xkBh96EvATN@)21Vx?9}0ay5~P9E%T@Tvt>r>3Spd^lE$>6n?B zxpTPliQ$yQz~CUtDt7mQ=~rs*0TBJApRUoMQ`l2~Y_5zAH8j|E5~YjlH!VCoN)%0@ z5)x14pDw4Ju=O!T{oBwP(GejyM&)~_ES{c)^ApSA;bF=U$4EKZ%*@Obn^b^<1~)P| z_V$EKjEry}d3J`94kPs~_VLE@$hUWQ$5A45Vs6J!o{~tU!a~#{ZUDVY&G}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/record_lock_top.png new file mode 100644 index 0000000000000000000000000000000000000000..a4ee1db1b2904f7416c09930e3e4923960849cae GIT binary patch literal 359 zcmV-t0hs=YP)tE!@dz$z?!t-!LZ zVHoI8un=pXEwF8S-*-9zti|%j1)8R<>q@7wZ5tH#3M5HtnubmW3W)xVh@yzN0MYFN z!!U>=(A|hA%aUgVbbkv>(h>Cz30avy76x-*8si*(|002ovPDHLk FV1ig0m5l%Z literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_top@2x.png b/Telegram/Resources/icons/lock/record_lock_top@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..b578b31059c3132800c1fc8c2b856a61b9f07b8c GIT binary patch literal 661 zcmV;G0&4w*pV`XP{wtNUa08PqD zO2(d=1vad(QFfxF49bGvd)HHMjr8)&YyO?{Tw62e-1jv)&dm7w`sEjEh(scSAe75x zNs@-c;e0;dZnwwdk%+F>>wdpqtyZ(y3?JbD9EO8&3M1u%!C)?ztJmx6^_p~n6B~^N z2EkCy>+kpbMNw1~<#xN#hq&MG7!bo^a0e(zCX={;m&=6=1A}7*2bQ zDPSU5mNBV~6okX!R;y*2f(IR#8UZX;;C8!9rPBF)CQCs8#6TEpEW~25@pw$O0b%0t zxY-u6*{rInWHS&6!Aw%%a=EJ2D%qG?t%i`sTJU&0olb{r4?-fUQ5JkY-(WBxhk&RE zY{+JDI-QcEK;RE=L%m+_Xfz@Rg4hWEvDLBL?UG}`e)ltLr_FyO-T@W<*8=W;i3#%g zynYLbMB;Qhu^|FQP)Fy|Fquqi8(}3{F#M7AaFPw*b{+LsP+R9&1RDr z1=ZfQkWQy9dCFqivz&LIYss=qOw;f8Ut36}QVf3`{(dP?^MwdWl86IP^TjQup->sK;h|Olh zn+Q~Xv=EI(iAzviBSH`aK1HCoMnt7j;Zp>P^SHBqz1McoE3D6g;u;Z)#ez=}%jHrd vVz=AzDFVecBEJ9c$RVn#YD5snd>i-!9z0f8tbs7&00000NkvXXu0mjfRwXgS literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_top@3x.png b/Telegram/Resources/icons/lock/record_lock_top@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..c8d63fe3c127d7f74b84fa49489a09a67afb148e GIT binary patch literal 1010 zcmV36TP7#7YZ8ft86SG`3hmjV3fGYyq*-#9k@DL|UcS zfpPVX*qu2?V3}QEdbhW?4-XIX z`TW(@RlQzswOZ|V`}Os;-|w>@;0t_`IEuuYX=X=zE4q~UPL3&Q!`A4`T6&ZPqso-qYIT+p!C;Uc7Cast5Ic2@i;D|##{-C+`ZGoE@9!jz2N3IWxu%GbPN&HlKcIJt z7&`f!omqk2@0N%}BIJuV-~D`Tu~;NoyeXARlS|m`_D-imvUt;OwscW5nZeawHN69~tZww9CZk^?Ia6JpF!O gCI)%YieCx70KdJ*Y!AUGEC2ui07*qoM6N<$f)m-hCIA2c literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_top_shadow.png b/Telegram/Resources/icons/lock/record_lock_top_shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..30d0aa4ec92cf5805f4a3e12dcab5c0686d967f2 GIT binary patch literal 557 zcmV+|0@D47P)U{XjV-7ROaSgcekb-P`| zF!uZX`Fs{nfG~ndA(3=Qyk4*54@M=mTCLS;W!tuR3nY>b2~^TPVK5lX=kvW@Z?oBm zkFniup@I^zJjNbcwNQ@H zXoU2GyRBBMt=DVy<`6~t-kryI*l09%yPbM-h$4-Fo8}l_IXH}B>dhgFGzM;(W7=kj vy_y`=08ykdaMK+B0ZiNCpMW$5F8%xfX+W6Sp^+#300000NkvXXu0mjfZC(2- literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/lock/record_lock_top_shadow@2x.png b/Telegram/Resources/icons/lock/record_lock_top_shadow@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..bc3943e4e0ece9ac5c056b06a8539e59a809f2de GIT binary patch literal 2244 zcmZuzc{r478=o-~!;GB}jN?8^)3?p^4gz814<v^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zG_ZC@hV>8^3kwE=^(Pk=76MXax|z5>Bn(jbI^!*bRu3@i^_^TdVS0`2{h7%JocA)? zI_teRCxBz%vGR?IimHpT45h=kMWS%cMSv35M$iEb193&&j?#$cV7G<#uUS&hot-vD z(Uh1d?k4fWyXCSzQ6MZfAq4`%9WdQ+Rko1>r#h zD!%s}3pSr`2$6kon5jtlOG`Um)S}r(nuEPP<6767UynmDaRtok4NXh}wx{oiYiuyT zL;S@TmLY*IbdD8*F^=cs*x;Z$aQuRTf`GXrQ^G~o`zNhVMI{`?b7(#&5JFi#i!D-w zLE^nBT3($CET5Q|7#T^aB%`9L@;`PakCLWzM2P*N1~83^I$rl_h5hhd#EWuF@;f-!p0lUQ<(nTazE%S6C!Y>}N_6 znE(SR5AlM-7*F;h^cI#H^>ej>7JO^6@IJGM3?nq~sLpGHgjqH#JDcB!1VvtF`X~8x zj*%pcYDUUf_c2?;ql3)4kyg7&&NftoMpx5w^h-T)t*86p1*-l_3%I(#xkWLdtE z?yqWK0OsJ}z{DlVHxY%RO+JbU3k&n|s%Jkqyn_Zv3c{7yNe10aQp&S}zzX<8_tjDt zmzSY{LIRBw0E%`y&WO&f1d$>bePQeWMC=#trW31o-5X3gEF(~>S`t?CP1ix zXZLFMe1hU4i-VtQ?DZJ3`RVU~e`As{fYwY9azaoimM8QEPz6t1w4)O1_3d7;h4KJ;gDBm=MATjt!z|*pxWj0gFp^A>Uh9gG Y;O2AA$#g7k;GY|istopValue(), _scroll->heightValue() ) | rpl::map([=](int top, int height) { - return top + height; + return top + height - st::historyRecordLockPosition.y(); }); _voiceRecordBar->setLockBottom(std::move(scrollHeight)); } diff --git a/Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp b/Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp index d942215658..a5d1a30850 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_voice_record_bar.cpp @@ -66,13 +66,18 @@ public: private: void init(); + void drawProgress(Painter &p); + Ui::Animations::Simple _lockAnimation; rpl::variable _progress = 0.; }; RecordLock::RecordLock(not_null parent) : RpWidget(parent) { - resize(st::historyRecordLockSize); + resize( + st::historyRecordLockTopShadow.width(), + st::historyRecordLockSize.height()); + // resize(st::historyRecordLockSize); init(); } @@ -90,23 +95,101 @@ void RecordLock::init() { ) | rpl::start_with_next([=](const QRect &clip) { Painter p(this); if (isLocked()) { - const auto color = anim::color( - Qt::red, - Qt::green, + const auto top = anim::interpolate( + 0, + height() - st::historyRecordLockTopShadow.height() * 2, _lockAnimation.value(1.)); - p.fillRect(clip, color); + p.translate(0, top); + drawProgress(p); return; } - p.fillRect(clip, anim::color(Qt::blue, Qt::red, _progress.current())); + drawProgress(p); }, lifetime()); locks( ) | rpl::start_with_next([=] { - const auto duration = st::historyRecordVoiceShowDuration * 3; + const auto duration = st::historyRecordVoiceShowDuration; _lockAnimation.start([=] { update(); }, 0., 1., duration); }, lifetime()); } +void RecordLock::drawProgress(Painter &p) { + const auto progress = _progress.current(); + + const auto &originTop = st::historyRecordLockTop; + const auto &originBottom = st::historyRecordLockBottom; + const auto &originBody = st::historyRecordLockBody; + const auto &shadowTop = st::historyRecordLockTopShadow; + const auto &shadowBottom = st::historyRecordLockBottomShadow; + const auto &shadowBody = st::historyRecordLockBodyShadow; + const auto &shadowMargins = st::historyRecordLockMargin; + + const auto bottomMargin = anim::interpolate( + 0, + rect().height() - shadowTop.height() - shadowBottom.height(), + progress); + + const auto topMargin = anim::interpolate( + rect().height() / 4, + 0, + progress); + + const auto full = rect().marginsRemoved( + style::margins(0, topMargin, 0, bottomMargin)); + const auto inner = full.marginsRemoved(shadowMargins); + const auto content = inner.marginsRemoved(style::margins( + 0, + originTop.height(), + 0, + originBottom.height())); + const auto contentShadow = full.marginsRemoved(style::margins( + 0, + shadowTop.height(), + 0, + shadowBottom.height())); + + const auto w = full.width(); + { + shadowTop.paint(p, full.topLeft(), w); + originTop.paint(p, inner.topLeft(), w); + } + { + const auto shadowPos = QPoint( + full.x(), + contentShadow.y() + contentShadow.height()); + const auto originPos = QPoint( + inner.x(), + content.y() + content.height()); + shadowBottom.paint(p, shadowPos, w); + originBottom.paint(p, originPos, w); + } + { + shadowBody.fill(p, contentShadow); + originBody.fill(p, content); + } + { + const auto &arrow = st::historyRecordLockArrow; + const auto arrowRect = QRect( + inner.x(), + content.y() + content.height() - arrow.height() / 2, + inner.width(), + arrow.height()); + p.setOpacity(1. - progress); + arrow.paintInCenter(p, arrowRect); + p.setOpacity(1.); + } + { + const auto &icon = isLocked() + ? st::historyRecordLockIcon + : st::historyRecordUnlockIcon; + icon.paint( + p, + inner.x() + (inner.width() - icon.width()) / 2, + inner.y() + (originTop.height() * 2 - icon.height()) / 2, + inner.width()); + } +} + void RecordLock::requestPaintProgress(float64 progress) { if (isHidden() || isLocked()) { return; @@ -230,7 +313,7 @@ void VoiceRecordBar::init() { auto callback = [=](auto value) { const auto right = anim::interpolate( -_lock->width(), - 0, + st::historyRecordLockPosition.x(), value); _lock->moveToRight(right, _lock->y()); if (value == 0. && !show) { diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index 1bf1b08bae..325c6160db 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -345,7 +345,21 @@ historyRecordDurationFg: historyComposeAreaFg; historyRecordTextTop: 14px; historyRecordLockShowDuration: historyToDownDuration; -historyRecordLockSize: size(50px, 150px); +historyRecordLockSize: size(75px, 150px); + +historyRecordLockTopShadow: icon {{ "lock/record_lock_top_shadow", historyToDownShadow }}; +historyRecordLockTop: icon {{ "lock/record_lock_top", historyToDownBg }}; +historyRecordLockBottomShadow: icon {{ "lock/record_lock_bottom_shadow", historyToDownShadow }}; +historyRecordLockBottom: icon {{ "lock/record_lock_bottom", historyToDownBg }}; +historyRecordLockBodyShadow: icon {{ "lock/record_lock_body_shadow", historyToDownShadow }}; +historyRecordLockBody: icon {{ "lock/record_lock_body", historyToDownBg }}; +historyRecordLockMargin: margins(4px, 4px, 4px, 4px); +historyRecordLockArrow: icon {{ "history_down_arrow-flip_vertical", historyToDownFg }}; + +historyRecordLockPosition: historyToDownPosition; + +historyRecordLockIcon: icon {{ "dialogs_unlock", historyToDownFg, point(1px, 0px) }}; +historyRecordUnlockIcon: icon {{ "dialogs_lock", historyToDownFg, point(0px, 0px) }}; historySilentToggle: IconButton(historyBotKeyboardShow) { icon: icon {{ "send_control_silent_off", historyComposeIconFg }};