Bug 1227120 - Filled bookmark star does not easily convey bookmarked state. r=mcomella
authorChenxia Liu <liuche@mozilla.com>
Wed, 02 Mar 2016 18:00:03 -0800
changeset 325166 23041118e31951f272c0a628a3d17b5dd6a30c7a
parent 325165 a195dd26ba1bf4477f52cae837870c0f26f39931
child 325167 2ccd650455e2f29a6c0b8e61b6c4f58fda003239
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1227120
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1227120 - Filled bookmark star does not easily convey bookmarked state. r=mcomella MozReview-Commit-ID: 8fSQiEycSGl
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedImageButton.java
mobile/android/base/resources/drawable-hdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-hdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xhdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xhdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xlarge-hdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-hdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_add.png
mobile/android/base/resources/drawable-xlarge-mdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-xhdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xlarge-xxhdpi-v11/star_blue.png
mobile/android/base/resources/drawable-xxhdpi-v11/ic_menu_bookmark_remove.png
mobile/android/base/resources/drawable-xxhdpi-v11/star_blue.png
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -3149,16 +3149,17 @@ public class BrowserApp extends GeckoApp
         }
 
         if (!GeckoThread.isRunning()) {
             aMenu.findItem(R.id.settings).setEnabled(false);
             aMenu.findItem(R.id.help).setEnabled(false);
         }
 
         Tab tab = Tabs.getInstance().getSelectedTab();
+        // Unlike other menu items, the bookmark star is not tinted. See {@link ThemedImageButton#setTintedDrawable}.
         final MenuItem bookmark = aMenu.findItem(R.id.bookmark);
         final MenuItem reader = aMenu.findItem(R.id.reading_list);
         final MenuItem back = aMenu.findItem(R.id.back);
         final MenuItem forward = aMenu.findItem(R.id.forward);
         final MenuItem share = aMenu.findItem(R.id.share);
         final MenuItem quickShare = aMenu.findItem(R.id.quickshare);
         final MenuItem bookmarksList = aMenu.findItem(R.id.bookmarks_list);
         final MenuItem historyList = aMenu.findItem(R.id.history_list);
@@ -3382,17 +3383,17 @@ public class BrowserApp extends GeckoApp
             historyList.setVisible(false);
         }
 
         return true;
     }
 
     private int resolveBookmarkIconID(final boolean isBookmark) {
         if (isBookmark) {
-            return R.drawable.ic_menu_bookmark_remove;
+            return R.drawable.star_blue;
         } else {
             return R.drawable.ic_menu_bookmark_add;
         }
     }
 
     private int resolveBookmarkTitleID(final boolean isBookmark) {
         return (isBookmark ? R.string.bookmark_remove : R.string.bookmark);
     }
--- a/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedImageButton.java
+++ b/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedImageButton.java
@@ -172,19 +172,21 @@ public class ThemedImageButton extends a
 
     @Override
     public void setImageDrawable(final Drawable drawable) {
         setTintedImageDrawable(drawable);
     }
 
     private void setTintedImageDrawable(final Drawable drawable) {
         final Drawable tintedDrawable;
-        if (drawableColors == null) {
-            // If we tint a drawable with a null ColorStateList, it will override
+        if (drawableColors == null || R.id.bookmark == getId()) {
+            // NB: If we tint a drawable with a null ColorStateList, it will override
             // any existing colorFilters and tint... so don't!
+
+            // NB: The bookmarked state uses a blue star, so this is a hack to keep it from being tinted.
             tintedDrawable = drawable;
         } else if (drawable == null) {
             tintedDrawable = null;
         } else {
             tintedDrawable = DrawableUtil.tintDrawableWithStateList(drawable, drawableColors);
         }
         super.setImageDrawable(tintedDrawable);
     }
deleted file mode 100644
index 09be9ac33e596cba603e6bac61406428bf5a17a2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..65b7bf3b86e6493963d580852ca18a38c90ed3f4
GIT binary patch
literal 754
zc%17D@N?(olHy`uVBq!ia0vp^Dj>|k3?#4J%UA`ZSkfJR9T^xl_H+M9WCijWi-X*q
z7}lMWc?o251o(uw`eYU|OuNf4=OM$idmzUD{~!{GrUTJ^5IOT6RAk0|hE*>?B0!aM
zUV|8m-$1!D?=#G}2h{~pJnbROocmD5w*OEofF#f;s73b~X8vcG4^}ht0mF=k470!*
zfu^nc&oJ{L!*rnGccHp~Xw@SS8=`*If2jC$2)YX*_y31F8)V>JhS_kJz<dF;5yFOO
zfePMbT>iBV7(n4AL4Lsu52TiyVOsZZhr?3y?I$dGw(a6Q&X?R9V0X1}|0BVahY9OX
zv%9~^OJw|D$jY(R$V7WzIJ5F>?-{G>IS)weVS9Y4M}OlQmdHhaY{ZR!)_$C6(Px|5
zwYGa#&_gC*u&a8yIEGl9ZoP87?2rKuTLLp@VZ*i_rqq0{yVdWVzUQsH_utp+k(HyJ
z-2c!eHR2oB2s^d7=xTfUoMcGxc_z3l(rCey_H$pKN&Y#L9XMy<mUB6lJO`Jtss7`=
zv+C?UX7_WwLT{ZXD6>Wu#5+Ba(cxOZ`Q+2rC5IX3ct@S6H;B@{td$Y8^r_U!218LH
z!^IpYX9v!m&~&n<YJS}c^Y{OLvVFG_-h6XLnR}M7{O81V>sI@`Qj+<3YulYU^A=Q}
zK6xfaEIvM{?TGHZi3_b6_nx}2u_4K5iok`bJdsRNr!GjF`G2yUtN6uq^IhZYo_emY
z3;fN)G6HIpzZ_0~Q#JMU^Z(r!j=Z1RwMTE-4L*e{v&y7=t#fYp=KqZ5D6M{5$1cC)
ga{l*SZ$9$BS$8k3efqI*V4N^`y85}Sb4q9e06ffBAOHXW
deleted file mode 100644
index 12b161c8f88b5973b33935e18fa5394f6e41df22..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..661441d24087346f7187679cb216cff12f3aef22
GIT binary patch
literal 1000
zc%17D@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sEa{HEjtmSN`?>!lvI6;x#X;^)
z4C~Ixyaci{0(?STeKHFfrrl+j`IKS$T@Yj1JrHBne}@16LEP#07-mAmfodKw%my>2
z!$jchMbAN6W<LUHM@ZdcnEQ-j&O?~?y9_h#LlsPa0M>X9YQm~VU<E+#1E}D_Cm_b+
zHw^p1E}3~BWE#|Y_d!~w!!5c8Li6uKje;=dJwZ4Ut`cO?OOR1;L5N}qcLqc~P~;)Z
zShxv~5l#h?v%ut>*C^pI^FM+;;{l4jAb;JR@i@p97y;!aL4LsuA4Qhmt=-Ga_#<Dg
z`;Dad{Qk3F4u|aLW)oU{>D%vCQK|2r_=7H9(3)2N^CjnfbEi2IghTmQm;(IQswY%W
z*|*X?Uf^1#M3wB)zb7^?d}qd^F*Efu$GWR=G4Cw|xAcBJe@u1ppXNJijl2!7A6Kv*
zUBBJgWo~A+8$;pMf52#;?djqe;&FWHl+^M=1`=-FB3--rwmme+IdJDL5ZKn&yGBJ#
zTK4ku+WdEKEq&*=ESjMC?6a$v;~Fi7kTBLm8VQrto~J8^9=zbGGs96=HOOv5thkez
z(?dCvB(=x#e3l27stLt0%r6tNo1V+HDw*jZ2TSFY=YP*TC2n;OyTP>R%*l^cYa=%N
zDERR7z!{^A&c43<FNa>l{y*Vl#H4cR>avB8oqw_A7-tEwIS7OqZ%X~x(%95uJB3xF
ztM!tW@Rln}j1p(q>!w()%?qA2=l+_v+MAtD#eX%ei=NOU|D;a#Yn9WX`X95e-ne-3
z^SwD6eD-l$)@8=V?4Kcge!l-!v9P`EkC$5uh=0&sCU7Epb9B@OW&SzQQ5DWyk(m!U
zj~*|Omv!LCws^>)DD$ADwxyt1IAHrH3qKB}78O5_12)BN!cIIYXSy3Q)PzNOeI|U+
zj4-vhv2La8q2C|4h3bB6b*+9}s`lH|{!c3l`}QyMviO2`-`S#aH8kJRMz81U^ZOGV
z!jGThtoZ#eD}7?yv(&k#V-o|`rfB6&Uw6j#FLU%|x!{oPWz&Eug~8L+&t;ucLK6Tz
C_{hKj
deleted file mode 100644
index 27d882b83cf84e0f14e871fcf68942659562af5b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b80c5ac44b9d1189d76e56a096fa5182edeab692
GIT binary patch
literal 685
zc%17D@N?(olHy`uVBq!ia0vp^av;pX3?zBp#Z3TGEa{HEjtmSN`?>!lvI6;x#X;^)
z4C~IxyaaMS2l#}z`eYU|OuNf4?H-uC%P<|tcnD(5xrY!0F&=;zs~&;KnLv@}3^Sj?
z*!LKw--W4!7;>Ls)<c*$*pTU9lOf9Hyk?kxA1wF?EC@Dv#zU~0yCB;azX363J^;zi
zgqZ;3&bS9P2V%?2`(UYiC{|B<2({(^f2en6!0eq4cG$GLFB`X)0KFej666=m@bSgb
z?>&NV<<%E{IqCF`^Np?;*Jsn-y?3AdeHW>{E30-=ds)8^ufz}Oxz>+ODwi7bUAC&@
zU$RUxw`t9<TLJZL9bZ5FQJQ#+@#ki{ZSR*We4eo6FVO5io-U3d8s}>-T`xOiz{8d>
znZ@Wv^?5$GmvTLPW+G85?)}f~;M6Nh`W%1qm*2UGZv>hqhg?;en9gG`F*||Hz}KUa
zrR<N<UcI0`6V)2V_LwfyRTgW$w%Rl#zdF>vyC<4W|Jc>o_b-|M1^=k2{~1*iY-GHO
zzr}N{k=n_FGoN^TlS%KKI6eE`yo(_zt7eq!*r69@`|eGtw#?n{2fpp&tTO#kvupZ>
zXJNWM@6WzZ`*-#I-9N_)Pn=ckv)%pjj{S?dHVqbUpPD=p%08B~MoV#><yw!&Ukhgx
zy^>1mHhVVLY_0HVQ`^W6?QfOAY0K?bGXyxs-2M0Of$yo^NnZorF!tZ;(%8GLod*~W
N44$rjF6*2UngHTnKa>Cf
deleted file mode 100644
index b9159d684156a36bf0bca3ecc064371d3f066a31..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 19e845c6a3e42e28ad6d6ea5cf59119372729953..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 13bf851b0df98356fbda436565e3029defb50100..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c0278d5748c13bd37a4168b322af42fde6db4b2a
GIT binary patch
literal 794
zc%17D@N?(olHy`uVBq!ia0vp^8X(NU3?z3ec*FxKmUKs7M+SzC{oH>NS%G}U;vjb?
zhIQv;UIN*C0X`wFKAD9KGw(A@zsE4`E&~1k4?;k}>GwehA~^2}lmS;i>j8+I0aGv?
z#+?pS12^p+ObwVZ9V{{(RThq>!vv?p)PqQvni(+dK=%Cm3^N{rExN}r>oG#vbR_lD
zA?ojg6a&R)LiFB8*s|(B!?Xu5jUZpd)x_KY22*57kY6xEK<dH2XTCEs^*BWS{3iSF
zs$<!6#m63>uV^J@<d|+ap#CRl$?tQ!T|3uaEdKQI!}9li3Y$`TS6|pyba_=Uhsi{9
z8NWG4^momFU3tS$BFuZTXY|=THm8&K1HBhW*8zjy)zif>#NzbaE9sM)3<TI7cx-IG
zv3uUzH*xR(`mO)I@BjaP8Ll8FC!_CmO>@)BoHns2`WtPU<7gwu=py%>t4h!EK?$F=
z;<D~TN{nhTrVr#+Kee1;nRZ~Us?C>tOJ;5VeIHJ=Mcp{Q*2Ant;%;j+ANzN8mCrY9
zcT5y5Sh{fSUE9@VvtNC?`A;`sv)(?A(AvFcO$t=*x<o$k61(~{L00s$jb8kf<F1L;
zs#gEs#LRj6$TGQ^DYyRmwl-t6pOz;Jr!8f<tLk-5c+G{xqqWyGXL&yi7F68bkzR8u
zCBp6hy9njOv)IK>Y-rdWFoCD}NBrtb+uV;POk$fXA(9brAmO}Wh_rPd>vw}2+tU_o
z?YwX_H2LSf;|~t3iMO9oer#Q&L_)!y6=l21o?h9Zd0ax~<<|M;-<Q?azCJ3*)-L?^
k@#W%}{qH9){P}}@+hkEak#jSefw9Km>FVdQ&MBb@05ME&WdHyG
deleted file mode 100644
index 42d1f962259047228452f937c0078b1dcb94b5ec..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c9cf4962208a9b34dce74a50989db18deac55951
GIT binary patch
literal 1193
zc%17D@N?(olHy`uVBq!ia0vp^HXzKw3=&b&bO2H;>5jgR3=A9lx&I`x0{M)^LGDfr
z>(0r%1hN+f_=LFnWEL{azt1q^A;a{$4FCT#%mku)46FV#OuGw3K*2@N8D`vP*bfoB
z4^jzY+=HnBGoXU^8D>8MF@R=5WM=@S9x=>#097{UHN(Ou4Abu+%!eR^nLzXJLq!(9
z0Si6{b00$$OouDJ3pVE-!_2z~!I`KgLoAy46k#JoC4@U0?3Wo3d%@;RgR!R}nYro_
z!z^S=A&dtMt6qXV2zE0>d<Iw}H1r;UL}uTGk@ujkMFiJ9s0%^vzYnweAqYX72M)s{
zJ}X^;G1pZR<QL2!VA8<IYR>%U?m;GQOO_K6(GQor`Q>+H$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