From d42588b9572b696d7a66543c4095b52a91bde583 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 26 Apr 2017 11:36:07 -0400 Subject: [PATCH] Improve appearance of generic attachments and the attachment approval dialog. // FREEBIE --- .../Contents.json | 6 +- .../file-black-40@1x.png | Bin 0 -> 1554 bytes .../file-black-40@2x.png | Bin 0 -> 1937 bytes .../file-black-40@3x.png | Bin 0 -> 2380 bytes .../file-icon-60@1x.png | Bin 1773 -> 0 bytes .../file-icon-60@2x.png | Bin 2397 -> 0 bytes .../file-icon-60@3x.png | Bin 2941 -> 0 bytes .../Contents.json | 4 +- .../file-thin-black-large.png | Bin 0 -> 37101 bytes .../file-white-40.imageset/Contents.json | 23 +++++ .../file-white-40@1x.png | Bin 0 -> 1593 bytes .../file-white-40@2x.png | Bin 0 -> 1996 bytes .../file-white-40@3x.png | Bin 0 -> 2477 bytes .../file-white-60@1x.png | Bin 1786 -> 0 bytes .../file-white-60@2x.png | Bin 2439 -> 0 bytes .../file-white-60@3x.png | Bin 2954 -> 0 bytes .../TSGenericAttachmentAdapter.m | 92 ++++++++++++------ Signal/src/UIColor+OWS.h | 1 + Signal/src/UIColor+OWS.m | 5 + .../AttachmentApprovalViewController.swift | 77 ++++++++++----- .../src/ViewControllers/ViewControllerUtils.h | 2 + .../src/ViewControllers/ViewControllerUtils.m | 14 +++ .../TSMessageAdapters/TSMessageAdapterTest.m | 22 +++-- 23 files changed, 174 insertions(+), 72 deletions(-) rename Signal/Images.xcassets/{file-white-60.imageset => file-black-40.imageset}/Contents.json (67%) create mode 100644 Signal/Images.xcassets/file-black-40.imageset/file-black-40@1x.png create mode 100644 Signal/Images.xcassets/file-black-40.imageset/file-black-40@2x.png create mode 100644 Signal/Images.xcassets/file-black-40.imageset/file-black-40@3x.png delete mode 100644 Signal/Images.xcassets/file-black-60.imageset/file-icon-60@1x.png delete mode 100644 Signal/Images.xcassets/file-black-60.imageset/file-icon-60@2x.png delete mode 100644 Signal/Images.xcassets/file-black-60.imageset/file-icon-60@3x.png rename Signal/Images.xcassets/{file-black-60.imageset => file-thin-black-large.imageset}/Contents.json (67%) create mode 100644 Signal/Images.xcassets/file-thin-black-large.imageset/file-thin-black-large.png create mode 100644 Signal/Images.xcassets/file-white-40.imageset/Contents.json create mode 100644 Signal/Images.xcassets/file-white-40.imageset/file-white-40@1x.png create mode 100644 Signal/Images.xcassets/file-white-40.imageset/file-white-40@2x.png create mode 100644 Signal/Images.xcassets/file-white-40.imageset/file-white-40@3x.png delete mode 100644 Signal/Images.xcassets/file-white-60.imageset/file-white-60@1x.png delete mode 100644 Signal/Images.xcassets/file-white-60.imageset/file-white-60@2x.png delete mode 100644 Signal/Images.xcassets/file-white-60.imageset/file-white-60@3x.png diff --git a/Signal/Images.xcassets/file-white-60.imageset/Contents.json b/Signal/Images.xcassets/file-black-40.imageset/Contents.json similarity index 67% rename from Signal/Images.xcassets/file-white-60.imageset/Contents.json rename to Signal/Images.xcassets/file-black-40.imageset/Contents.json index a57cb66ce..17d4e7afc 100644 --- a/Signal/Images.xcassets/file-white-60.imageset/Contents.json +++ b/Signal/Images.xcassets/file-black-40.imageset/Contents.json @@ -2,17 +2,17 @@ "images" : [ { "idiom" : "universal", - "filename" : "file-white-60@1x.png", + "filename" : "file-black-40@1x.png", "scale" : "1x" }, { "idiom" : "universal", - "filename" : "file-white-60@2x.png", + "filename" : "file-black-40@2x.png", "scale" : "2x" }, { "idiom" : "universal", - "filename" : "file-white-60@3x.png", + "filename" : "file-black-40@3x.png", "scale" : "3x" } ], diff --git a/Signal/Images.xcassets/file-black-40.imageset/file-black-40@1x.png b/Signal/Images.xcassets/file-black-40.imageset/file-black-40@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..2342d9986d491c3d067a2883df00632374a89686 GIT binary patch literal 1554 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEjKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z81_llpi<;HsXMd|v6mX?-X(Gs7c7{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C)C@Tue@6IPPMM!?EYEN%+G$U{97~m&YuUnuI{;|GfQ~IN*(dsa}NK0=4i1cDX=9i cIL`KuLAtVW*?Cj$@1T0p)78&qol`;+02tT2$^ZZW literal 0 HcmV?d00001 diff --git a/Signal/Images.xcassets/file-black-40.imageset/file-black-40@3x.png b/Signal/Images.xcassets/file-black-40.imageset/file-black-40@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..c63bc75d2e9e26c32978bfee97c6561e9be9e8b3 GIT binary patch literal 2380 zcmeAS@N?(olHy`uVBq!ia0vp^6(G#P1|%(0%q{^b#^NA%Cx&(BWL^R}oCO|{#S9GG z!XV7ZFl&wk0|SdnW=KRygs+cPa(=E}VoH8es$NBI0Z=sqgH44MkeQoWlBiITo0C^; zRbi_HR$&EXgM{^!6u?SKvTcwsYk*NEcCio^nlW#B-B_{|37a;u=! z;{2RaP!NRXWtP|(*?>KSE{q5fh%V>++=8Oi;$omSJ5#6@WHEI05eRGS%wcvQ3!-cA zFUkb^G!f)3J42`i$YSW~Be7Y4EQq856!caBnH8xy5iXg)00sNP(8$0>AFB+yPUrlb z{G#B3#NO_`@YPHb^;C$PV1klnysb^yZh;wzb6a`ltfRaWZ|eVbqW8#zC2aXx@@%-0qn3S~NR!X8OV#$Mm`W_5J*( zANN~t`O*EqPGq~UVCF8k^VH61zw;Ui&A&aXUOF7Vvc>P}=^kBCo*jl&g3AT=A6fEp zvEBjS?+d3s-rd%lw}e++@qg!xna_HC+3r})V$6|RKCAw+p1sn1_dgS!_4)t>r&*k} zaa-eLqt}A&v%vU}Udg9#C_wPW`flfEqmqM>{G_Q7j{`~FIp0dmXSEK8ARKHI>^{yo@ zeAaa>UW@*_)&XYkf{%0b_bZDXTkpIh$%e$=;?#mJipgJto@jG?%V3gjQr=8%h&g1 zUzbt-SAOK4OzUY=-W_j_UH>H-SM}lR>8X2+0z9WGcKtBQ+ zW#6=6#cSnVU(NQWF6Ddjr(<8#%Za;YAQc(#@}u#a><^aktw)|5-I-_&YT|gh`njxg HN@xNA*qWMJ literal 0 HcmV?d00001 diff --git a/Signal/Images.xcassets/file-black-60.imageset/file-icon-60@1x.png b/Signal/Images.xcassets/file-black-60.imageset/file-icon-60@1x.png deleted file mode 100644 index 873b272875b3ef7e8a8ffc1d39bdd693936f0e26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1773 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8Ea{HEjtmSN`?>!lvI6;>1s;*b z3=G`DAk4@xYmNj^jZ$VvL`j6Nk5zJhu3lnFep0GlMQ#C5HPEmMD* z7iAWdWaj57fXq!y$}cUkRZ;?31P2gzmSmOrNrwBXptL9l?5C7u{nVV)+|<01VxT@ltkwa;7OoM+krjyr5X-=U2=SW@$mLc+ zsm1v@rJx`P&C4vYGqM4D2wfNvA`o59`MCu}sl~-WZFZ(mEy!Z%>LU==*qOuZKo&&T z;9ryp^l2i;q38AY7TN8=P8YBrMjVZ}i#idDEsmUcsu?37XaN2iDOxH&ew$aC` z+6I^stbFrRGSezu5=&C;j0_CTtqhEp^uQ%R{x==!0?*Qm%qzS+FQD&)RVT?S$ojJFZ=`xb`tHFeQ4rIEG}f zzKz=Hci2IIm!&YI#6&=li)(_$i-nDHSygt-6L#!tYP-K+k*kwP!-NIKvaGDULhcs# zJa$hqJ^1?Wjn@{3*L>MB(>Cqd+34eakKCMRzv1GkykLEFmgR%v$+;I*eJw1Q`?{>O zHvMOu-I+7>hW4Zl+3!2DFP$m%`QP|Yuw&^LmYVH8Yifm`U$`-~tX$1P)0VTx{m`z? z$#$N*C06f=JoLT8M#}IPSB>yZ{|7f~)OLqlI$R)esb=33r$0-tN8NWRlHOr7nf-;g zYVM!3vdq@wM&Y9KBU-tYe)H-u86PlpNM5SVJAdX{`IhOvX1QOMPU5q@G&8i*Wa5GM zY6aPU#O>~ts{7aoCop?VzSnp+SeoUKiw@(ZB`^Qo5q{~Y$W!-pf}F~sr4!ZM*Inz+ zf2kVoG-Ec~3%lI>$a}|cKaaFhFPrj`wPGv3Qa$U7gbDMu`!{GdtjkoY=Ml*Z)%NME zXLLE$YJTQ&@`})zzwXFOm+or2+!YjeR^~#my#2yxiDI*T2X|V0dcyl>{a1nJx(gRB z<}tpn{QcVH2kXgs&sFCb{-0%d&opMa^4+O(o-@e4{qpp|9ks>{lNIKN9NMFFDJL{y z)}lH6T4%JC&W5!v)jaic1!cl~p)>9+UJ=cGO7jUX!>`LT??v(J2EAco{i`VFw4?Wo ze&d3!V`<#~RgSF5mythI#=F6**{;zY^&3srap75OY1IrcPNWZQrem@r6`oETG Y|DT=??|lmI^gtDmr>mdKI;Vst0Mr+M=Kufz diff --git a/Signal/Images.xcassets/file-black-60.imageset/file-icon-60@2x.png b/Signal/Images.xcassets/file-black-60.imageset/file-icon-60@2x.png deleted file mode 100644 index fd1009293d2c9bbf28158c326a2c1d1bba6245e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2397 zcmeAS@N?(olHy`uVBq!ia0vp^6(G#P1|%(0%q{^bmUKs7M+SzC{oH>NS%G}c0*}aI z1_o|n5N2eUHAe!dMkO;Oq9nrC$0|8LS1&OoKPgqOBDVmjnt{Ql!V1XDO)W`OsL0L9 zE4HezRRXK90GK4GQ<#=IWDQi z$wiq3C7Jno3LtY6lk!VTY?YKi7Qq3;oh6xR2%GYXq22;|P#+|tZ>VRWk4;-@MJ5hy zAQ_z6Qj+1mDkv?=0sAQ>SwA%=H8(Y{q!_5r5UX{-u!Us=@X|;H|DmcSHI?NFQ0yQqM*Fr0Zt1>^#?3-8iWg& zt_n-6T~Z-xH9Np~>X(p|X$MZIUtzr>E*kvz!$%==-W`Xd`VF?1{^i*A*7mVr)Z-tK z&Mpzj>U-|G^U6GlYG}O~ve|6H1l}Fi{}_MDW#yJn|C;|r;^VdH3;s@7aej&&|Hoin z^Bb*oIoFp5Ugk}1TPLevJwG8=_CaKv-?Ph>``aay_fMJ`{pAM(b6nJeTJvKk@~`_G zV3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8C{5f%K zrLaVZzWCoLr7Z62Dnv|8p(&TmQCT_7xVGuwSqpgzXOh=Uy;qqz@@W(*s@PWts9nbzRR9hs` literal 0 HcmV?d00001 diff --git a/Signal/Images.xcassets/file-white-40.imageset/Contents.json b/Signal/Images.xcassets/file-white-40.imageset/Contents.json new file mode 100644 index 000000000..c768f53a9 --- /dev/null +++ b/Signal/Images.xcassets/file-white-40.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "file-white-40@1x.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "file-white-40@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "file-white-40@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Signal/Images.xcassets/file-white-40.imageset/file-white-40@1x.png b/Signal/Images.xcassets/file-white-40.imageset/file-white-40@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..694c889be0b4c40b92373315aae572ff1539f1d6 GIT binary patch literal 1593 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEjKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z81_llpi<;HsXMd|v6mX?-X(Gs7c7{+3kj2o|M`E)8SrADBDCn&MGAmMZB3v?o0SfkoiGhtiRta>C&iOg{ zMZpD$$*CZRfwdqBp{oX46N$?jBnc#qDalsFrAb+-$t6g!1&lLr+ILD!*GCez(Z{OV z2AC48eDhN>(<)sOOH%EO3=GY64NP>6%t8zetPD)7%*|}{(bOQh03_pFl$uzQUlfv` zpJNC1MJ|Y|V5|q#i7XG*YNHRzMM${{l4Zf7z&vZm1+){E|LwSDoU`x(7AG4#T^vIq zIN#1#>vzOKq&51GKZk+F-`!;t>^e$!zS z-&lq7-o4c`drHTh1@fyx1ud>Lsh$kBsV_hB{Q#>{xL47hg=Q>j9kbk?h-#g4X#d|G z=gPWBw6W6HWuCFwLbW2b{`OyCtlwH?F4{BgzPo9k4@YdQ>$!(_qUW9dG5Moe1jF*m zJJ(l#UyvVnbw_99v6Xy(j~`I!o^5%&Al79*Pr?1Rdff|oPwh55U;AT``N8uF%!>s( zjMt0oXIaYo{h7ixuak8fdeaR;?(h42&@8LbvCz$}@siR+0a+0?Pb(`8T_Mhkj)@bN zEN;dn_(5OhO;>l0)9J0N-*lVbl)L4aQW$^RWyaa9!q-E$dTh`*^d@ENNx==P^7-~{ hu8#}voVfn=0rA5wiRu+$fo-7j+|$+1Wt~$(69Df_AAkS= literal 0 HcmV?d00001 diff --git a/Signal/Images.xcassets/file-white-40.imageset/file-white-40@2x.png b/Signal/Images.xcassets/file-white-40.imageset/file-white-40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..568366f358e112e4d5771c6ff033cf019a56138c GIT binary patch literal 1996 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51|<6gKdl8)jKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z81_llpi<;HsXMd|v6mX?-X(Gs7c7{+3kj2o|M`E)8SrADBDCn&MGAmMZB3v?o0Sfkog@KJeRta>C&iOg{ zMZpD$$*CZRfwdqBp{oX46N$?jBnc#qDalsFrAb+-$t6g!1&lLr+ILD!*GCez(Z{OV z2AC48eDhN>(<)sOOH%EO3=GY64NP>6%t8zetPD)7j7@Cx(bOQh03_pFl$uzQUlfv` zpJNC1MJ|Y|V60~b(TOY%)oP;;%0)=I3X)~PqQE?B#|6|0%l~#<>)vGDW?*1;_H=O! zsbGA2$F|2OQRLW1*(2ZG8(l=CE_Qe=y6mxS)0IccCLS6o+GZCgytr;A!X+fs;V z4&HaamhJxQ^j7!I_DN4|v$sYSw@$x(_0cPaZM&lmC&Yc3e02`X$Cn9V+qX;;YS53o zV>5C3)-9H{p&#XUbjGN>J|SKtapd}$!}b;2<;TAKzZGScU>x}-hvT#Rrt}H7H!nJH zDoi}0ZCA%vlVg?z6OZgp5U*r;WcIAFN2r1M=7st-Dt@wsd^W!KC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Dr8|U3Qr4?^^n7!G6Az z#*g-G+5CX%gY&28DUtnQzpV;6k4;ys3}Sp*Jaxl^m>>Uq+nzkXal7rCvfVDWznLD> z>JBCyyyzw#_y=nND^;s>__qIyu1kllYW-E#HjX z&bZ0j*`4kAy|hHk=LpY9XAK~CZ@*#p#dhP$qC3mW#eCd&PU;J66n$IW6V+SCFv0jf}Im>h5rBy5szb)kVfLiSLmPU%kY_yfgCqg2nYT z?D(8^6+M$X`lmAE;XWC^b;c_!S$;nJ9yjG|)8^#2#}+=Uo0ZNz{l%B(whzySRb1Z6 zH);M8O`A(G+;W{~{`a@X2epNL5wkP1by&P-^R@@ab{&$}*=J_AkH+{z?1!bv?R&-ghMT9Ln_N_RGA|TNwYRt^M8=+n5u2?{*(<6_HxnVXxN9)bXR_ z2d{YT<^-#x+y>U{pO-J|&ghGfPB<9#?@I~yGUaP*5gVr2+um(@*|C*TY|T@D|Lvnn zDGY%xn^^uY*gxqTw??aHx@Sz)s;jSbQbN5>Wq+NaCAMQtkL#rd=Zp%$dqzSl5>8jV zn8Bz0TF7>p>(2*|I1KbJe(#E2racp_gaUFM6j}Z;aj=~aRlL)p32H-my85}Sb4q9e E0E@ill>h($ literal 0 HcmV?d00001 diff --git a/Signal/Images.xcassets/file-white-60.imageset/file-white-60@1x.png b/Signal/Images.xcassets/file-white-60.imageset/file-white-60@1x.png deleted file mode 100644 index 5940a14f5cee31e8ba7df9dc97ac60e880ac5f97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1786 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8Ea{HEjtmSN`?>!lvI6;>1s;*b z3=G`DAk4@xYmNj^jZ$VvL`j6Nk5zJhu3lnFep0GlMQ#C5HPEmMD* z7iAWdWaj57fXq!y$}cUkRZ;?31P2gzmSmOrNrwBXptL9l?5C7u{nVV)+|<01VxT@ltkwa;7OoM+krjyr5X-=U2=SW@$mLc+ zsm1v@rJx`P&C4vYGqM4D2w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)Q^_DIE<(;=be@?Wo zyYgY;;x@^wf1eGHp5GvEzwE@SpHHlB$1*#+Cm@lK4V_IPp;g4 zR`;z1>c=j=I$hO&YeBT`XPM%B*IMI`X1=j2d94cFs$+oex_Kiy9B5?!R<-XYim$>a z=iA;kYM$p?EBk_UMG>V}*kawoH~U=-zQSgk?e+D*^}y-%H79G9t@{S_-B%OS z-ztJ%*BiQY{@Q)SAQb58PGj>+lS;4L+%10<7>LSOXWe;yZK~DpkB_H5iH`qa)V#0Y zXfD&XMdxb%ROr8}3jqe?_M6g1U#}hSPg`V`q0(EXxE84I?Y1`GdqG#&dQ&f&WoW;8 zFKn$@ZXf5j#`>2~v)!(sFTDR1GheTm&-W}mz2Nlq?mhPISJcyao?R}L-XV1HkEHS> z@n!#;%C-AGy*0YPUI+Q+PY=ez*(T2duvFg70x;Z_>e0*i>z5TkyAX_RWRJ6fjwViE6|Iz4~As`k$B`!_|cwd*fE zeI#o7mFxu3#j*3M_eeGE6A?NEtT&#U1srzoE6zV;e&N8e2FHA#AKBt;JiEFtzfdz{ z #import #import @@ -74,9 +76,14 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - JSQMessageMediaData protocol +- (CGFloat)bubbleHeight +{ + return 45.f; +} + - (CGFloat)iconSize { - return 60.f; + return 40.f; } - (CGFloat)hMargin @@ -89,11 +96,6 @@ NS_ASSUME_NONNULL_BEGIN return 10.f; } -- (UIFont *)attachmentLabelFont -{ - return [UIFont ows_regularFontWithSize:11.f]; -} - - (UIView *)mediaView { if (_cachedMediaView == nil) { @@ -110,14 +112,14 @@ NS_ASSUME_NONNULL_BEGIN const CGFloat kBubbleTailWidth = 6.f; CGRect contentFrame = CGRectMake(self.incoming ? kBubbleTailWidth : 0.f, self.vMargin, - viewSize.width - kBubbleTailWidth, + viewSize.width - kBubbleTailWidth - 10, viewSize.height - self.vMargin * 2.f); - UIImage *image = [UIImage imageNamed:(self.incoming ? @"file-black-60" : @"file-white-60")]; + UIImage *image = [UIImage imageNamed:(self.incoming ? @"file-black-40" : @"file-white-40")]; OWSAssert(image); UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; - CGRect iconFrame = CGRectMake(round(contentFrame.origin.x + (contentFrame.size.width - self.iconSize) * 0.5f), - round(contentFrame.origin.y), + CGRect iconFrame = CGRectMake(round(contentFrame.origin.x + 10.f), + round(contentFrame.origin.y + (contentFrame.size.height - self.iconSize) * 0.5f), self.iconSize, self.iconSize); imageView.frame = iconFrame; @@ -131,35 +133,66 @@ NS_ASSUME_NONNULL_BEGIN UILabel *fileTypeLabel = [UILabel new]; fileTypeLabel.text = fileExtension.uppercaseString; - fileTypeLabel.textColor = textColor; + fileTypeLabel.textColor = [textColor colorWithAlphaComponent:0.85f]; fileTypeLabel.lineBreakMode = NSLineBreakByTruncatingTail; fileTypeLabel.font = [UIFont ows_mediumFontWithSize:20.f]; fileTypeLabel.adjustsFontSizeToFitWidth = YES; + fileTypeLabel.textAlignment = NSTextAlignmentCenter; CGRect fileTypeLabelFrame = CGRectZero; fileTypeLabelFrame.size = [fileTypeLabel sizeThatFits:CGSizeZero]; - fileTypeLabelFrame.size.width = ceil(MIN(self.iconSize * 0.45f, fileTypeLabelFrame.size.width)); + // This dimension depends on the space within the icon boundaries. + fileTypeLabelFrame.size.width = 20.f; // Center on icon. fileTypeLabelFrame.origin.x = round(iconFrame.origin.x + (iconFrame.size.width - fileTypeLabelFrame.size.width) * 0.5f); fileTypeLabelFrame.origin.y - = round(iconFrame.origin.y + (iconFrame.size.height - fileTypeLabelFrame.size.height) * 0.5f + 5); + = round(iconFrame.origin.y + (iconFrame.size.height - fileTypeLabelFrame.size.height) * 0.5f); fileTypeLabel.frame = fileTypeLabelFrame; [_cachedMediaView addSubview:fileTypeLabel]; - UILabel *attachmentLabel = [UILabel new]; - attachmentLabel.text = NSLocalizedString(@"GENERIC_ATTACHMENT_LABEL", @"A label for generic attachments."); - attachmentLabel.textColor = [textColor colorWithAlphaComponent:0.85f]; - attachmentLabel.lineBreakMode = NSLineBreakByTruncatingTail; - attachmentLabel.font = [self attachmentLabelFont]; - [attachmentLabel sizeToFit]; - CGRect attachmentLabelFrame = CGRectZero; - attachmentLabelFrame.size = attachmentLabel.bounds.size; - attachmentLabelFrame.origin.x - = round(contentFrame.origin.x + (contentFrame.size.width - attachmentLabelFrame.size.width) * 0.5f); - attachmentLabelFrame.origin.y - = round(contentFrame.origin.y + contentFrame.size.height - attachmentLabelFrame.size.height); - attachmentLabel.frame = attachmentLabelFrame; - [_cachedMediaView addSubview:attachmentLabel]; + const CGFloat kLabelHSpacing = 3; + const CGFloat kLabelVSpacing = 2; + NSString *topText = + [self.attachment.filename stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + if (topText.length < 1) { + topText = [MIMETypeUtil fileExtensionForMIMEType:self.attachment.contentType].uppercaseString; + } + if (topText.length < 1) { + topText = NSLocalizedString(@"GENERIC_ATTACHMENT_LABEL", @"A label for generic attachments."); + } + UILabel *topLabel = [UILabel new]; + topLabel.text = topText; + topLabel.textColor = textColor; + topLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; + topLabel.font = [UIFont ows_mediumFontWithSize:15.f]; + [topLabel sizeToFit]; + [_cachedMediaView addSubview:topLabel]; + + NSError *error; + unsigned long long fileSize = + [[NSFileManager defaultManager] attributesOfItemAtPath:self.attachment.filePath error:&error].fileSize; + OWSAssert(!error); + NSString *bottomText = [ViewControllerUtils formatFileSize:fileSize]; + UILabel *bottomLabel = [UILabel new]; + bottomLabel.text = bottomText; + bottomLabel.textColor = [textColor colorWithAlphaComponent:0.85f]; + bottomLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; + bottomLabel.font = [UIFont ows_regularFontWithSize:13.f]; + [bottomLabel sizeToFit]; + [_cachedMediaView addSubview:bottomLabel]; + + CGRect topLabelFrame = CGRectZero; + topLabelFrame.size = topLabel.bounds.size; + topLabelFrame.origin.x = round(iconFrame.origin.x + iconFrame.size.width + kLabelHSpacing); + topLabelFrame.origin.y = round(contentFrame.origin.y + + (contentFrame.size.height - (topLabel.frame.size.height + bottomLabel.frame.size.height + kLabelVSpacing)) + * 0.5f); + topLabelFrame.size.width = round((contentFrame.origin.x + contentFrame.size.width) - topLabelFrame.origin.x); + topLabel.frame = topLabelFrame; + + CGRect bottomLabelFrame = topLabelFrame; + bottomLabelFrame.origin.y += topLabelFrame.size.height + kLabelVSpacing; + bottomLabel.frame = bottomLabelFrame; if (!self.incoming) { self.attachmentUploadView = [[AttachmentUploadView alloc] initWithAttachment:self.attachment @@ -173,8 +206,9 @@ NS_ASSUME_NONNULL_BEGIN - (CGSize)mediaViewDisplaySize { - const CGFloat kVSpacing = 1.f; - return CGSizeMake(100, ceil(self.iconSize + self.attachmentLabelFont.lineHeight + kVSpacing + self.vMargin * 2)); + CGSize size = [super mediaViewDisplaySize]; + size.height = ceil(self.bubbleHeight + self.vMargin * 2); + return size; } #pragma mark - OWSMessageEditing Protocol diff --git a/Signal/src/UIColor+OWS.h b/Signal/src/UIColor+OWS.h index 7a9ab87f0..66d4aee72 100644 --- a/Signal/src/UIColor+OWS.h +++ b/Signal/src/UIColor+OWS.h @@ -8,6 +8,7 @@ + (UIColor *)ows_signalBrandBlueColor; + (UIColor *)ows_materialBlueColor; ++ (UIColor *)ows_destructiveRedColor; + (UIColor *)ows_fadedBlueColor; + (UIColor *)ows_darkBackgroundColor; + (UIColor *)ows_darkGrayColor; diff --git a/Signal/src/UIColor+OWS.m b/Signal/src/UIColor+OWS.m index d16d0e909..30005f90f 100644 --- a/Signal/src/UIColor+OWS.m +++ b/Signal/src/UIColor+OWS.m @@ -58,6 +58,11 @@ return [UIColor colorWithRed:255. / 255.f green:56.f / 255.f blue:103.f / 255.f alpha:1.f]; } ++ (UIColor *)ows_destructiveRedColor +{ + return [UIColor colorWithRed:0.98639106750488281 green:0.10408364236354828 blue:0.33135244250297546 alpha:1.f]; +} + + (UIColor *)ows_errorMessageBorderColor { return [UIColor colorWithRed:195.f / 255.f green:0 blue:22.f / 255.f alpha:1.0f]; diff --git a/Signal/src/ViewControllers/AttachmentApprovalViewController.swift b/Signal/src/ViewControllers/AttachmentApprovalViewController.swift index d7afbbc3d..91102edf7 100644 --- a/Signal/src/ViewControllers/AttachmentApprovalViewController.swift +++ b/Signal/src/ViewControllers/AttachmentApprovalViewController.swift @@ -45,17 +45,24 @@ class AttachmentApprovalViewController: UIViewController, OWSAudioAttachmentPlay override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = UIColor.black + view.backgroundColor = UIColor.white self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem:.stop, target:self, action:#selector(donePressed)) - self.navigationItem.title = NSLocalizedString("ATTACHMENT_APPROVAL_DIALOG_TITLE", - comment: "Title for the 'attachment approval' dialog.") + self.navigationItem.title = dialogTitle() createViews() } + private func dialogTitle() -> String { + guard let filename = formattedFileName() else { + return NSLocalizedString("ATTACHMENT_APPROVAL_DIALOG_TITLE", + comment: "Title for the 'attachment approval' dialog.") + } + return filename + } + override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) @@ -140,10 +147,11 @@ class AttachmentApprovalViewController: UIViewController, OWSAudioAttachmentPlay audioPlayButton.autoSetDimension(.height, toSize:buttonSize) subviews.append(audioPlayButton) - if let fileExtensionLabel = createFileExtensionLabel() { + if let fileNameLabel = createFileNameLabel() { + subviews.append(fileNameLabel) + } else if let fileExtensionLabel = createFileExtensionLabel() { subviews.append(fileExtensionLabel) } - let fileSizeLabel = createFileSizeLabel() subviews.append(fileSizeLabel) @@ -209,13 +217,14 @@ class AttachmentApprovalViewController: UIViewController, OWSAudioAttachmentPlay private func createGenericPreview(attachmentPreviewView: UIView) { var subviews = [UIView]() - let imageView = createHeroImageView(imageName: "file-icon-large") + let imageView = createHeroImageView(imageName: "file-thin-black-large") subviews.append(imageView) - if let fileExtensionLabel = createFileExtensionLabel() { + if let fileNameLabel = createFileNameLabel() { + subviews.append(fileNameLabel) + } else if let fileExtensionLabel = createFileExtensionLabel() { subviews.append(fileExtensionLabel) } - let fileSizeLabel = createFileSizeLabel() subviews.append(fileSizeLabel) @@ -256,34 +265,48 @@ class AttachmentApprovalViewController: UIViewController, OWSAudioAttachmentPlay comment: "Format string for file extension label in call interstitial view"), fileExtension.uppercased()) - fileExtensionLabel.textColor = UIColor.white + fileExtensionLabel.textColor = UIColor.ows_materialBlue() fileExtensionLabel.font = labelFont() fileExtensionLabel.textAlignment = .center return fileExtensionLabel } + private func formattedFileName() -> String? { + guard let rawFilename = attachment.filename else { + return nil + } + let filename = rawFilename.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) + guard filename.characters.count > 0 else { + return nil + } + return filename + } + + private func createFileNameLabel() -> UIView? { + guard let filename = formattedFileName() else { + return nil + } + let label = UILabel() + label.text = filename + label.textColor = UIColor.ows_materialBlue() + label.font = labelFont() + label.textAlignment = .center + return label + } + private func createFileSizeLabel() -> UIView { - let numberFormatter = NumberFormatter() - numberFormatter.numberStyle = NumberFormatter.Style.decimal - let fileSizeLabel = UILabel() + let label = UILabel() let fileSize = attachment.data.count - let kOneKilobyte = 1024 - let kOneMegabyte = kOneKilobyte * kOneKilobyte - let fileSizeText = (fileSize > kOneMegabyte - ? numberFormatter.string(from: NSNumber(value: fileSize / kOneMegabyte))! + " mb" - : (fileSize > kOneKilobyte - ? numberFormatter.string(from: NSNumber(value: fileSize / kOneKilobyte))! + " kb" - : numberFormatter.string(from: NSNumber(value: fileSize))!)) - fileSizeLabel.text = String(format:NSLocalizedString("ATTACHMENT_APPROVAL_FILE_SIZE_FORMAT", + label.text = String(format:NSLocalizedString("ATTACHMENT_APPROVAL_FILE_SIZE_FORMAT", comment: "Format string for file size label in call interstitial view. Embeds: {{file size as 'N mb' or 'N kb'}}."), - fileSizeText) + ViewControllerUtils.formatFileSize(UInt(fileSize))) - fileSizeLabel.textColor = UIColor.white - fileSizeLabel.font = labelFont() - fileSizeLabel.textAlignment = .center + label.textColor = UIColor.ows_materialBlue() + label.font = labelFont() + label.textAlignment = .center - return fileSizeLabel + return label } private func createButtonRow(attachmentPreviewView: UIView) { @@ -308,7 +331,7 @@ class AttachmentApprovalViewController: UIViewController, OWSAudioAttachmentPlay let cancelButton = createButton(title: NSLocalizedString("TXT_CANCEL_TITLE", comment: ""), - color : UIColor(rgbHex:0xff3B30), + color : UIColor.ows_destructiveRed(), action: #selector(cancelPressed)) buttonRow.addSubview(cancelButton) cancelButton.autoPinEdge(toSuperviewEdge:.top) @@ -317,7 +340,7 @@ class AttachmentApprovalViewController: UIViewController, OWSAudioAttachmentPlay let sendButton = createButton(title: NSLocalizedString("ATTACHMENT_APPROVAL_SEND_BUTTON", comment: "Label for 'send' button in the 'attachment approval' dialog."), - color : UIColor(rgbHex:0x4CD964), + color : UIColor(rgbHex:0x2ecc71), action: #selector(sendPressed)) buttonRow.addSubview(sendButton) sendButton.autoPinEdge(toSuperviewEdge:.top) diff --git a/Signal/src/ViewControllers/ViewControllerUtils.h b/Signal/src/ViewControllers/ViewControllerUtils.h index ccb96260f..fd26f69cc 100644 --- a/Signal/src/ViewControllers/ViewControllerUtils.h +++ b/Signal/src/ViewControllers/ViewControllerUtils.h @@ -18,4 +18,6 @@ + (void)setAudioIgnoresHardwareMuteSwitch:(BOOL)shouldIgnore; ++ (NSString *)formatFileSize:(unsigned long)fileSize; + @end diff --git a/Signal/src/ViewControllers/ViewControllerUtils.m b/Signal/src/ViewControllers/ViewControllerUtils.m index 53553268e..d3ead206c 100644 --- a/Signal/src/ViewControllers/ViewControllerUtils.m +++ b/Signal/src/ViewControllers/ViewControllerUtils.m @@ -80,6 +80,20 @@ NS_ASSUME_NONNULL_BEGIN } } ++ (NSString *)formatFileSize:(unsigned long)fileSize +{ + const unsigned long kOneKilobyte = 1024; + const unsigned long kOneMegabyte = kOneKilobyte * kOneKilobyte; + + NSNumberFormatter *numberFormatter = [NSNumberFormatter new]; + numberFormatter.numberStyle = NSNumberFormatterDecimalStyle; + return (fileSize > kOneMegabyte + ? [[numberFormatter stringFromNumber:@(fileSize / kOneMegabyte)] stringByAppendingString:@" mb"] + : (fileSize > kOneKilobyte + ? [[numberFormatter stringFromNumber:@(fileSize / kOneKilobyte)] stringByAppendingString:@" kb"] + : [[numberFormatter stringFromNumber:@(fileSize)] stringByAppendingString:@" bytes"])); +} + #pragma mark - Logging + (NSString *)tag diff --git a/Signal/test/ViewControllers/Signals/TSMessageAdapters/TSMessageAdapterTest.m b/Signal/test/ViewControllers/Signals/TSMessageAdapters/TSMessageAdapterTest.m index e98a37e74..6d91be59c 100644 --- a/Signal/test/ViewControllers/Signals/TSMessageAdapters/TSMessageAdapterTest.m +++ b/Signal/test/ViewControllers/Signals/TSMessageAdapters/TSMessageAdapterTest.m @@ -1,4 +1,6 @@ -// Copyright © 2016 Open Whisper Systems. All rights reserved. +// +// Copyright (c) 2017 Open Whisper Systems. All rights reserved. +// #import "TSAttachmentStream.h" #import "TSContentAdapters.h" @@ -99,7 +101,7 @@ - (void)testCanPerformEditingActionWithVideoMessage { - TSAttachmentStream *videoAttachment = [[TSAttachmentStream alloc] initWithContentType:@"video/mp4"]; + TSAttachmentStream *videoAttachment = [[TSAttachmentStream alloc] initWithContentType:@"video/mp4" filename:nil]; self.messageAdapter.mediaItem = [[TSVideoAttachmentAdapter alloc] initWithAttachment:videoAttachment incoming:NO]; XCTAssertTrue([self.messageAdapter canPerformEditingAction:@selector(delete:)]); @@ -112,7 +114,7 @@ - (void)testCanPerformEditingActionWithAudioMessage { - TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/mp3"]; + TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/mp3" filename:nil]; self.messageAdapter.mediaItem = [[TSVideoAttachmentAdapter alloc] initWithAttachment:audioAttachment incoming:NO]; XCTAssertTrue([self.messageAdapter canPerformEditingAction:@selector(delete:)]); @@ -159,7 +161,7 @@ XCTAssertNotNil([TSMessage fetchObjectWithUniqueID:self.message.uniqueId]); NSError *error; - TSAttachmentStream *videoAttachment = [[TSAttachmentStream alloc] initWithContentType:@"video/mp4"]; + TSAttachmentStream *videoAttachment = [[TSAttachmentStream alloc] initWithContentType:@"video/mp4" filename:nil]; [videoAttachment writeData:[NSData new] error:&error]; [videoAttachment save]; @@ -181,7 +183,7 @@ XCTAssertNotNil([TSMessage fetchObjectWithUniqueID:self.message.uniqueId]); NSError *error; - TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/mp3"]; + TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/mp3" filename:nil]; [audioAttachment writeData:[NSData new] error:&error]; [audioAttachment save]; @@ -215,7 +217,7 @@ XCTAssertNil(UIPasteboard.generalPasteboard.image); NSError *error; - TSAttachmentStream *attachment = [[TSAttachmentStream alloc] initWithContentType:@"image/jpeg"]; + TSAttachmentStream *attachment = [[TSAttachmentStream alloc] initWithContentType:@"image/jpeg" filename:nil]; [attachment writeData:self.fakeAudioData error:&error]; [attachment save]; @@ -243,7 +245,7 @@ UIPasteboard.generalPasteboard.items = @[]; NSError *error; - TSAttachmentStream *videoAttachment = [[TSAttachmentStream alloc] initWithContentType:@"video/mp4"]; + TSAttachmentStream *videoAttachment = [[TSAttachmentStream alloc] initWithContentType:@"video/mp4" filename:nil]; [videoAttachment writeData:self.fakeVideoData error:&error]; self.messageAdapter.mediaItem = [[TSVideoAttachmentAdapter alloc] initWithAttachment:videoAttachment incoming:YES]; @@ -259,7 +261,7 @@ XCTAssertNil([UIPasteboard.generalPasteboard dataForPasteboardType:(NSString *)kUTTypeMP3]); NSError *error; - TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/mp3"]; + TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/mp3" filename:nil]; [audioAttachment writeData:self.fakeAudioData error:&error]; self.messageAdapter.mediaItem = [[TSVideoAttachmentAdapter alloc] initWithAttachment:audioAttachment incoming:NO]; @@ -273,7 +275,7 @@ XCTAssertNil([UIPasteboard.generalPasteboard dataForPasteboardType:(NSString *)kUTTypeMPEG4Audio]); NSError *error; - TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/x-m4a"]; + TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/x-m4a" filename:nil]; [audioAttachment writeData:self.fakeAudioData error:&error]; self.messageAdapter.mediaItem = [[TSVideoAttachmentAdapter alloc] initWithAttachment:audioAttachment incoming:NO]; @@ -287,7 +289,7 @@ XCTAssertNil([UIPasteboard.generalPasteboard dataForPasteboardType:(NSString *)kUTTypeAudio]); NSError *error; - TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/wav"]; + TSAttachmentStream *audioAttachment = [[TSAttachmentStream alloc] initWithContentType:@"audio/wav" filename:nil]; [audioAttachment writeData:self.fakeAudioData error:&error]; self.messageAdapter.mediaItem = [[TSVideoAttachmentAdapter alloc] initWithAttachment:audioAttachment incoming:NO];