From e15449435caff5c3f2547f9acff18c9a4d962e27 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 22 Aug 2016 14:01:27 +0300 Subject: [PATCH] Use 16/32px icon in new MD toolbar --- 16w.png | Bin 0 -> 438 bytes 32.png | Bin 0 -> 636 bytes 32w.png | Bin 0 -> 658 bytes manifest.json | 2 ++ messaging.js | 7 ++++++- 5 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 16w.png create mode 100644 32.png create mode 100644 32w.png diff --git a/16w.png b/16w.png new file mode 100644 index 0000000000000000000000000000000000000000..359ccf39d642a5613fe1076f8bf20267fc09b051 GIT binary patch literal 438 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstUx|vage(c z!@6@aFM%A%64!{5;QX|b^2DN42FH~Aq*MjZ+{E=VVs)1gx-h#GD6FEQ1SHoTO`3P&0T%~{kN_ViH>b6Ch`2Pb2s^8xjEJ%dr@khy zs0c%ZoVcm6aq|=}VPWAu1680dAV~Bu1Csy$|95b3c>n&rfq_9oL&N?1_xJDLpOBES ze*OCM=g$`u6wIGLe_yl5e4tXN{?uS>y#Lwdv}KzcX7=ol{N!-c;Y?a& z4?}3O9Z+Gnr;B5V#O2s?H-!!<@HhkpEMU5Ib*+}bt`-0Px3V4japCtgM#lCPZRhq0E;;j{P&&Re@ru{thB4A)(35z);Re+Ld7VCF~F2LkWlSsxh%!4;(zmz>^M) zF~)r?ffu^dTP5nyriuwFAXzNSMSJ;mb`q-~?__Uu(4YXXal8>|MSxfa|NOf@1sDM0 WXX#S_LmnCc0000!lvI6;x#X;^) z4C~IxyaaM2OI#yLg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>J3GfMVy)e6! zo12Y`nTe5+Vcv-cK;eI%K*sHLFkE*uNkoWOke^k6pMjH|QCW%G-btU84djMC165uY zW_$cn@c#Y#`}gk`6chvm1Q-|?%%4ABK|x{t`t|3}pWnZKe?me+e}8|&7C#T59_5lC zzhL7tXFeGl8#fpmZ{C0A=FH4zYaOOG_&zK42wqm~*3%I05c!Z#VRj@i92`7d978Nl zFTEU|-)tb#mdKtw>(Pcy>6g3CTdXc10 z+x@+qSHJnfpmO!I@eaviz87!QAN=fI8{wy$@R_$|C1YWcNwz`%vcorXJQ&a4?)Uaj z<2|7Mm@h%C^PEU~&_U^70R{EoX&*Ea?7F4YW5pOkJ1>gtaY{I zh~T-y|L{$1X24A!AI9qqU%$PxIA?c7cg3;&%qvWck4by-uVRao4~d>SbFY=!*)EZV zxr-J=bA7iwv2oD?1@>nJM{lVm@UD1rY0>7JSAMa|9uRxC$L{^A73&fczB48#{d~4t qIoKrf<~L=9IckbIT>pNS*E1QoxpNmUiEIZ3J%gvKpUXO@geCykdj2E; literal 0 HcmV?d00001 diff --git a/manifest.json b/manifest.json index 7ac27daa..b41d8701 100644 --- a/manifest.json +++ b/manifest.json @@ -51,6 +51,8 @@ "options_page": "manage.html", "browser_action": { "default_icon": { + "16": "16w.png", + "32": "32w.png", "19": "19w.png", "38": "38w.png" }, diff --git a/messaging.js b/messaging.js index adc5e7fe..9f6fdc67 100644 --- a/messaging.js +++ b/messaging.js @@ -47,7 +47,12 @@ function updateIcon(tab, styles) { var disableAll = "disableAll" in styles ? styles.disableAll : prefs.get("disableAll"); var postfix = styles.length == 0 || disableAll ? "w" : ""; chrome.browserAction.setIcon({ - path: {19: "19" + postfix + ".png", 38: "38" + postfix + ".png"}, + path: { + // Material Design 2016 new size is 16px + 16: "16" + postfix + ".png", 32: "32" + postfix + ".png", + // Chromium forks or non-chromium browsers may still use the traditional 19px + 19: "19" + postfix + ".png", 38: "38" + postfix + ".png", + }, tabId: tab.id }, function() { // if the tab was just closed an error may occur,