From 2bdb9af14674f4a843414b47765dc631c848e034 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 13 Feb 2021 08:52:36 +0300 Subject: [PATCH] Added dummy control icons for photo editor. --- .../Resources/icons/photo_editor/flip.png | Bin 0 -> 134 bytes .../Resources/icons/photo_editor/flip@2x.png | Bin 0 -> 187 bytes .../Resources/icons/photo_editor/flip@3x.png | Bin 0 -> 259 bytes .../Resources/icons/photo_editor/paint.png | Bin 0 -> 459 bytes .../Resources/icons/photo_editor/paint@2x.png | Bin 0 -> 901 bytes .../Resources/icons/photo_editor/paint@3x.png | Bin 0 -> 1400 bytes .../Resources/icons/photo_editor/rotate.png | Bin 0 -> 553 bytes .../icons/photo_editor/rotate@2x.png | Bin 0 -> 1084 bytes .../icons/photo_editor/rotate@3x.png | Bin 0 -> 1342 bytes .../Resources/icons/photo_editor/undo.png | Bin 0 -> 337 bytes .../Resources/icons/photo_editor/undo@2x.png | Bin 0 -> 642 bytes .../Resources/icons/photo_editor/undo@3x.png | Bin 0 -> 896 bytes Telegram/SourceFiles/editor/editor.style | 25 +++++++++++++++--- .../editor/photo_editor_controls.cpp | 2 +- 14 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 Telegram/Resources/icons/photo_editor/flip.png create mode 100644 Telegram/Resources/icons/photo_editor/flip@2x.png create mode 100644 Telegram/Resources/icons/photo_editor/flip@3x.png create mode 100644 Telegram/Resources/icons/photo_editor/paint.png create mode 100644 Telegram/Resources/icons/photo_editor/paint@2x.png create mode 100644 Telegram/Resources/icons/photo_editor/paint@3x.png create mode 100644 Telegram/Resources/icons/photo_editor/rotate.png create mode 100644 Telegram/Resources/icons/photo_editor/rotate@2x.png create mode 100644 Telegram/Resources/icons/photo_editor/rotate@3x.png create mode 100644 Telegram/Resources/icons/photo_editor/undo.png create mode 100644 Telegram/Resources/icons/photo_editor/undo@2x.png create mode 100644 Telegram/Resources/icons/photo_editor/undo@3x.png diff --git a/Telegram/Resources/icons/photo_editor/flip.png b/Telegram/Resources/icons/photo_editor/flip.png new file mode 100644 index 0000000000000000000000000000000000000000..ec776f6eb6eea3dc618a089ab214e402f7cef61d GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_*1Ur!gu5R22v2@Cjs@UvXG`oaFg z|I_~i8rCrS?f><@e--08nfA8-|KlH(G9{`9Ml-iDhFmvz)t>mcJ)C9ockU40e=J59 iy8rJhId}O8GeiFI&ogsNFE|4YX7F_Nb6Mw<&;$UyTr+wA literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/photo_editor/flip@2x.png b/Telegram/Resources/icons/photo_editor/flip@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..5717ef76a9b3faf079dc91933b9acda6edfc87b5 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DCQlc~kch)?uRC%zCKnzgboNt-dM^ebFP*1{yw|HNw*msvIJZz zcn?IdPt$X#i#c-LRV;xo#?GO^a)H@Z8IFM2S$r%je61Oe{`zcP%GmUl$;fz1`J9P= lBu=zE`x=$JpTEXPJ2>K02g{|WKY*@b@O1TaS?83{1OWRtMYaF{ literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/photo_editor/flip@3x.png b/Telegram/Resources/icons/photo_editor/flip@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..79910ffe0c869d2f4d2795b47ef54af881a12cb7 GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhawPIrZ2?`LbIhK+*@W#6`pSe`ijBR)z4*} HQ$iB}?Eq(9 literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/photo_editor/paint.png b/Telegram/Resources/icons/photo_editor/paint.png new file mode 100644 index 0000000000000000000000000000000000000000..cdcd6c705e68e8f715c5966a12c453ca0b22be5e GIT binary patch literal 459 zcmV;+0W|)JP)2=B1$?!=OaR*QTPZVL?XuXu0670;?6D&agt}x?AbZ*oINwUg~Gql0q0yT%)mJu z!oZI;2C*7g0oegu#3ScMzr6@Ts@%lq85f}mj^GhWxfdb%lemfTY#L-87R%&GOt&Sj z+yo>F*P#8Vw|KB8sgn2=bJU)mU{RZxLA=j$g8lCkr{Z>)ghki~nQud_=izNZXab(3 zh&{i#_`1NgPJPAewB!=+jisF1!*@b8w89$5bjI_ECzWj>a0AWh6TrQ`(p}ISWv@ID zSG5nYoEEn+@iCCyK~T?&mYn#0d;{!!h}&&dG8m4cXx)MpJ=K(97F4~y!Zu$L@g=e4vIhn@@lwce--~_awj^-3JW)}Pt39qomU}ntg2ZjIu002ovPDHLkV1f&5 B%vS&a literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/photo_editor/paint@2x.png b/Telegram/Resources/icons/photo_editor/paint@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e9a4a33e8a63fd083fdb7452adb2cebb95567833 GIT binary patch literal 901 zcmV;01A6?4P)7NO6vsOniqKM_jYNdTLM^OW6x}qj=t@X@B_cFLVnuYx z%ErP*EF>frRyHMVB2?|VqDZ7o9~QnsE7EjBN}u1UxpI2l_ukBV%?U zf6lvaX5Q4*<(5|D^>w$IFYZOLAZ z_(iPiH_F4d&8u)pR)hGvmiX)cvUs@yt?+sR30D3k$MX9~k&CASSYG*9zZoi4?WNMb z+T@l0e=E;6X@Cwm06lOR#z9-9XB)Z0`rS4p+yFOV8p>HF#h*g)w{oi0+!Oruu06cjy4tXjU=8> zie&G18{u}#Tod%EcyZ5zfAL|}&RSxQ+oJ70@rz+ht&@|spXdGDq)0rhgbdkYOZ8c^ zO|7$CZ{q98tY2vyEhX4B&RYAvASaTj_yw-SYODpnUiC+nAH^M0LDTrJU}q2nZ`62A zZlx1ww~np_SyRrgK7KzDiHetuI>9^zeAQCTdNqRTN_3EH9p$CaPFOTun=1p1m!ch2O8_xn{}lInn9b~w7R%-7WAMOpOe@O_EumhvOOSjl^3z) zk|3fJ1|aIcFnRXb3x9mG`%{Yawjd zh>x&gBDK(^kg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*Uk3EuXH-*|ds4x%ulY43}sdCKMErY1cRu_TI_f**1e;Q{ z-}l-MVol(DoN?q@K4SZUwy4X*jkZI;PGGZ5nL4UhC0NTY-##1rivKC;9w4(`rqdGC zlXtC^AZeC7Sg*Kk_q7hT1hSe&yTCwO z6wGH`CGTH;7$VI9+7yhtswPitrYF%kmG_S zo6J-{f#xDyoNhxdo~*<@=GvUbB)86ONt37&U+Y#OJN68 zOp^4#D%`onL)KX2A&4ts3Yz2)YYC)4!g~kgqFa|DaRwDRhajqg6Og!t7I%n6z5;Eg z3AF`~NSQs~9)WJY$NmGnAwIFOL3aRO5O@GbN<%kalp?huh%^LU93(c3*^W`bT!}dF zlOgBmZ`4_5rI6KJ38M}{w+(VlW$LV4!yHI#dBu=~{*0rt?cI>JQ=*@AH8q}wLMuGN z6LfeDEur2FS0G>XfY$P*^!DKmEVI#0F?0xZ-8|ttsBO^6w{j1sS~-)_2n?YX$y{8} z4uZsd#?{DZ>OvWtH*I#cJ%`8GPJ_I_XJ~*00000NkvXXu0mjfJ)`nY literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/photo_editor/rotate@2x.png b/Telegram/Resources/icons/photo_editor/rotate@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..478e24fa582b61871d1efb031be85dc62d364256 GIT binary patch literal 1084 zcmV-C1jGA@P)PGNzUvBT+7p-=##kR%#_AH(YQ* z#%`>{AE3CAS}u&{*M*c{i5sSg)RwH+5;2+AN6)FxPUq} z@y(3y0}&t1q7;Dm78KtBGomR^h%+w$@oV6g*JfI5@xq^J0f=7*XBVgy@={nXt0ahD z4A)~&?cp5e`T*z$ec(Ch%;j=VXvg0uU_VG>9|$@NqI{)-?+gO!!Ap?V1_?Y0YJ!vE znAs~NNl7ku@fKJjW6Q2Fme1;J&;T}oDZsYZT-eU5)niYTWK0oL!9!qMn-;)i6<80h z+K!Ar%bfO)(kF@Y337chxCgY2DnJXuX$5$oo$3Dq+q7S1eTZ8?5BLU7xQMx418xFi z-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4C3%Ykq}GheN72Y~yTI)G0lKZArvFv6*_)-<6_c*l3T7(z}%_FusF8BJRUYXf}WR zM^Wt7gASF!QE0>n1go8rrL$If zg`%U89q^SP2|Wia=?QCbgZ9l32L`1)03yV~{0% z$ZMpe$@~9ogYItF#crFsMq{~c57J}V|JM91fDupgX}ACsFBCHX*{<*6t%gEl3yL?Z z3L{wpX9U?SKJE}$kckh>l3R`b22OnBsxWLNfZ{`Y8yKkrPJHc?0w=yWbirwCJ@M7E z3lO{3&YZm98gP+%;OxxlFGV2O+5)C+Cs1Y14YCcmNF8w6b_!mlZ~(KjCvg_pO3b!^ z*%i}(Uu2*%>2d~TerG`&ok%{cYKP#K;;(ThX?;_e+z54^7b)H=&zn-3-M|5IGg1ImL;D~gZbh= z{Q|Ph9W1gv?VJzlZ2t*Jj39ZC^(C@R{HA(~$prX98m55H^6+DAl;tGXYrBiqWUO=T% zNT?K4By=L2ZxSObw|5U9JIR-so&EiGlF3~v<->2lZ@}mZ!Z4gr?~O4d?P=z&NZo=G zA?deu26_bX}Si8VHgoR z8tB^a6a%q{NNC0l5W^s1a5T`3Mf{1zkA&t-Z(?%y$KW{NOT!Y@kQ0ghAIP^}cKEcl j<$K@j!DqjLKia?>>jHqF*`-|c00000NkvXXu0mjf$b*ev literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/photo_editor/undo@2x.png b/Telegram/Resources/icons/photo_editor/undo@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0ef97e89e8f6f9684c0e2ac58416eb4d07194e3e GIT binary patch literal 642 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTCmUKs7M+SzC{oH>NSs56ZEInNu zLo!(3PPg}naTGXa8|cC!xG_M4ThKRIaZ$uAu0>{IX6z5SCQfnZa^1MW@S}hF(!IT{ z9TSw6cJ$8W=(1en#M0Y!(Bsma{eu4YqVK=Gz1KQ-PGkS~vh-)O=jMOcEl*9&TGgPn zfNKR4g8C3A>M^4?ee+GmXV(sdC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*2@ literal 0 HcmV?d00001 diff --git a/Telegram/SourceFiles/editor/editor.style b/Telegram/SourceFiles/editor/editor.style index 718c7fe980..bfc24dbb28 100644 --- a/Telegram/SourceFiles/editor/editor.style +++ b/Telegram/SourceFiles/editor/editor.style @@ -13,11 +13,28 @@ using "ui/chat/chat.style"; photoEditorControlsHeight: 100px; +photoEditorButtonIconFg: historyComposeIconFg; +photoEditorButtonIconFgOver: historyComposeIconFgOver; + +photoEditorButtonIconFgActive: historyComposeIconFgOver; + photoEditorRotateButton: IconButton(historyAttach) { - icon: icon {{ "send_control_attach", historyComposeIconFg }}; - iconOver: icon {{ "send_control_attach", historyComposeIconFgOver }}; + icon: icon {{ "photo_editor/rotate", photoEditorButtonIconFg }}; + iconOver: icon {{ "photo_editor/rotate", photoEditorButtonIconFgOver }}; } photoEditorFlipButton: IconButton(historyAttach) { - icon: icon {{ "send_control_attach", historyComposeIconFg }}; - iconOver: icon {{ "send_control_attach", historyComposeIconFgOver }}; + icon: icon {{ "photo_editor/flip", photoEditorButtonIconFg }}; + iconOver: icon {{ "photo_editor/flip", photoEditorButtonIconFgOver }}; +} +photoEditorPaintModeButton: IconButton(historyAttach) { + icon: icon {{ "photo_editor/paint", photoEditorButtonIconFg }}; + iconOver: icon {{ "photo_editor/paint", photoEditorButtonIconFgOver }}; +} +photoEditorUndoButton: IconButton(historyAttach) { + icon: icon {{ "photo_editor/undo", photoEditorButtonIconFg }}; + iconOver: icon {{ "photo_editor/undo", photoEditorButtonIconFgOver }}; +} +photoEditorRedoButton: IconButton(historyAttach) { + icon: icon {{ "photo_editor/undo-flip_horizontal", photoEditorButtonIconFg }}; + iconOver: icon {{ "photo_editor/undo-flip_horizontal", photoEditorButtonIconFgOver }}; } diff --git a/Telegram/SourceFiles/editor/photo_editor_controls.cpp b/Telegram/SourceFiles/editor/photo_editor_controls.cpp index 562339aaa1..89c7d77e0a 100644 --- a/Telegram/SourceFiles/editor/photo_editor_controls.cpp +++ b/Telegram/SourceFiles/editor/photo_editor_controls.cpp @@ -52,7 +52,7 @@ PhotoEditorControls::PhotoEditorControls( st::photoEditorFlipButton)) , _paintModeButton(base::make_unique_q( _buttonsContainer, - st::photoEditorFlipButton)) { + st::photoEditorPaintModeButton)) { _buttonsContainer->updateChildrenPosition();