Merge branch 'osx-menu-icon' into dev

Close #133
This commit is contained in:
Yuya Ochiai
2016-06-12 22:04:21 +09:00
29 changed files with 456 additions and 221 deletions

View File

@@ -24,6 +24,9 @@
#### Windows
- Added the tooltip for the tray icon in order to show count of unread channels/mantions.
#### OS X
- Added colored badges to the menu icon when there are unread channels/mentions.
#### Linux
- Added the option to show the icon on menu bar. (requires libappindicator1 on Ubuntu)

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 500 500"
style="enable-background:new 0 0 500 500;"
xml:space="preserve"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="ClickedMenuIcon.svg"><metadata
id="metadata14"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs12" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1342"
inkscape:window-height="773"
id="namedview10"
showgrid="false"
inkscape:zoom="0.472"
inkscape:cx="-312.89678"
inkscape:cy="250"
inkscape:window-x="485"
inkscape:window-y="333"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><style
type="text/css"
id="style4"> .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#222222;} </style><g
id="XMLID_1_"
style="fill:#ffffff;fill-opacity:1;stroke:none"
transform="matrix(0.99998928,0,0,0.99998928,-0.01497322,0.02529433)"><g
id="XMLID_3_"
style="fill:#ffffff;fill-opacity:1;stroke:none"><path
id="XMLID_4_"
class="st0"
d="m 396.9,47.7 2.6,53.1 c 43,47.5 60,114.8 38.6,178.1 C 406.1,373.3 300.7,423 202.7,389.8 104.7,356.6 51.1,253.1 83,158.7 104.5,95.2 159.2,52 222.5,40.5 L 256.7,0.1 C 150,-2.8 49.3,63.4 13.3,169.9 -31,300.6 39.1,442.5 169.9,486.7 300.7,530.9 442.5,460.9 486.8,330.1 522.7,223.9 483.1,110.3 396.9,47.7 Z"
style="clip-rule:evenodd;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g><path
id="XMLID_2_"
class="st0"
d="m 335.6,204.3 -1.8,-74.2 -1.5,-42.7 -1,-37 c 0,0 0.2,-17.8 -0.4,-22 -0.1,-0.9 -0.4,-1.6 -0.7,-2.2 0,-0.1 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.2 -0.1,-0.2 -0.7,-1.2 -1.8,-2.1 -3.1,-2.6 -1.4,-0.5 -2.9,-0.4 -4.2,0.2 0,0 -0.1,0 -0.1,0 -0.2,0.1 -0.3,0.1 -0.4,0.2 -0.6,0.3 -1.2,0.7 -1.8,1.3 -3,3 -13.7,17.2 -13.7,17.2 l -23.2,28.8 -27.1,33 -46.5,57.8 c 0,0 -21.3,26.6 -16.6,59.4 4.7,32.8 29.1,48.7 48,55.1 18.9,6.4 48,8.5 71.6,-14.7 23.5,-23 22.7,-57.1 22.7,-57.1 z"
style="clip-rule:evenodd;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 500 500"
style="enable-background:new 0 0 500 500;"
xml:space="preserve"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="ClickedMenuIconMention.svg"><metadata
id="metadata14"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs12"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4148"><g
id="g4150"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"
transform="matrix(0.99998928,0,0,0.99998928,-0.01497322,0.02529433)"><g
id="g4152"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"><path
id="path4154"
class="st0"
d="m 396.9,47.7 2.6,53.1 c 43,47.5 60,114.8 38.6,178.1 C 406.1,373.3 300.7,423 202.7,389.8 104.7,356.6 51.1,253.1 83,158.7 104.5,95.2 159.2,52 222.5,40.5 L 256.7,0.1 C 150,-2.8 49.3,63.4 13.3,169.9 -31,300.6 39.1,442.5 169.9,486.7 300.7,530.9 442.5,460.9 486.8,330.1 522.7,223.9 483.1,110.3 396.9,47.7 Z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g><path
id="path4156"
class="st0"
d="m 335.6,204.3 -1.8,-74.2 -1.5,-42.7 -1,-37 c 0,0 0.2,-17.8 -0.4,-22 -0.1,-0.9 -0.4,-1.6 -0.7,-2.2 0,-0.1 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.2 -0.1,-0.2 -0.7,-1.2 -1.8,-2.1 -3.1,-2.6 -1.4,-0.5 -2.9,-0.4 -4.2,0.2 0,0 -0.1,0 -0.1,0 -0.2,0.1 -0.3,0.1 -0.4,0.2 -0.6,0.3 -1.2,0.7 -1.8,1.3 -3,3 -13.7,17.2 -13.7,17.2 l -23.2,28.8 -27.1,33 -46.5,57.8 c 0,0 -21.3,26.6 -16.6,59.4 4.7,32.8 29.1,48.7 48,55.1 18.9,6.4 48,8.5 71.6,-14.7 23.5,-23 22.7,-57.1 22.7,-57.1 z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g></clipPath></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1278"
inkscape:window-height="1368"
id="namedview10"
showgrid="false"
inkscape:zoom="0.472"
inkscape:cx="-382.01244"
inkscape:cy="250"
inkscape:window-x="1273"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><style
type="text/css"
id="style4"> .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#222222;} </style><path
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M -62.5 -62.5 L -62.5 562.5 L 562.5 562.5 L 562.5 -62.5 L -62.5 -62.5 z M 343.75 156.25 A 187.5 187.5 0 0 1 531.25 343.75 A 187.5 187.5 0 0 1 343.75 531.25 A 187.5 187.5 0 0 1 156.25 343.75 A 187.5 187.5 0 0 1 343.75 156.25 z "
id="rect4141"
clip-path="url(#clipPath4148)" /><circle
style="opacity:1;fill:#ff1744;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4137"
cx="343.75"
cy="343.75"
r="156.25" /></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 500 500"
style="enable-background:new 0 0 500 500;"
xml:space="preserve"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="ClickedMenuIconUnread.svg"><metadata
id="metadata14"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs12"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4148"><g
id="g4150"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"
transform="matrix(0.99998928,0,0,0.99998928,-0.01497322,0.02529433)"><g
id="g4152"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"><path
id="path4154"
class="st0"
d="m 396.9,47.7 2.6,53.1 c 43,47.5 60,114.8 38.6,178.1 C 406.1,373.3 300.7,423 202.7,389.8 104.7,356.6 51.1,253.1 83,158.7 104.5,95.2 159.2,52 222.5,40.5 L 256.7,0.1 C 150,-2.8 49.3,63.4 13.3,169.9 -31,300.6 39.1,442.5 169.9,486.7 300.7,530.9 442.5,460.9 486.8,330.1 522.7,223.9 483.1,110.3 396.9,47.7 Z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g><path
id="path4156"
class="st0"
d="m 335.6,204.3 -1.8,-74.2 -1.5,-42.7 -1,-37 c 0,0 0.2,-17.8 -0.4,-22 -0.1,-0.9 -0.4,-1.6 -0.7,-2.2 0,-0.1 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.2 -0.1,-0.2 -0.7,-1.2 -1.8,-2.1 -3.1,-2.6 -1.4,-0.5 -2.9,-0.4 -4.2,0.2 0,0 -0.1,0 -0.1,0 -0.2,0.1 -0.3,0.1 -0.4,0.2 -0.6,0.3 -1.2,0.7 -1.8,1.3 -3,3 -13.7,17.2 -13.7,17.2 l -23.2,28.8 -27.1,33 -46.5,57.8 c 0,0 -21.3,26.6 -16.6,59.4 4.7,32.8 29.1,48.7 48,55.1 18.9,6.4 48,8.5 71.6,-14.7 23.5,-23 22.7,-57.1 22.7,-57.1 z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g></clipPath></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1278"
inkscape:window-height="1368"
id="namedview10"
showgrid="false"
inkscape:zoom="0.472"
inkscape:cx="-382.01244"
inkscape:cy="250"
inkscape:window-x="1273"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><style
type="text/css"
id="style4"> .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#222222;} </style><path
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M -62.5 -62.5 L -62.5 562.5 L 562.5 562.5 L 562.5 -62.5 L -62.5 -62.5 z M 343.75 156.25 A 187.5 187.5 0 0 1 531.25 343.75 A 187.5 187.5 0 0 1 343.75 531.25 A 187.5 187.5 0 0 1 156.25 343.75 A 187.5 187.5 0 0 1 343.75 156.25 z "
id="rect4141"
clip-path="url(#clipPath4148)" /><circle
style="opacity:1;fill:#00e5ff;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4137"
cx="343.75"
cy="343.75"
r="156.25" /></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 500 500"
style="enable-background:new 0 0 500 500;"
xml:space="preserve"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="MenuIcon.svg"><metadata
id="metadata14"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs12" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1342"
inkscape:window-height="773"
id="namedview10"
showgrid="false"
inkscape:zoom="0.472"
inkscape:cx="-337.92373"
inkscape:cy="250"
inkscape:window-x="485"
inkscape:window-y="333"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><style
type="text/css"
id="style4"> .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#222222;} </style><g
id="XMLID_1_"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"
transform="matrix(0.99998928,0,0,0.99998928,-0.01497322,0.02529433)"><g
id="XMLID_3_"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"><path
id="XMLID_4_"
class="st0"
d="m 396.9,47.7 2.6,53.1 c 43,47.5 60,114.8 38.6,178.1 C 406.1,373.3 300.7,423 202.7,389.8 104.7,356.6 51.1,253.1 83,158.7 104.5,95.2 159.2,52 222.5,40.5 L 256.7,0.1 C 150,-2.8 49.3,63.4 13.3,169.9 -31,300.6 39.1,442.5 169.9,486.7 300.7,530.9 442.5,460.9 486.8,330.1 522.7,223.9 483.1,110.3 396.9,47.7 Z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g><path
id="XMLID_2_"
class="st0"
d="m 335.6,204.3 -1.8,-74.2 -1.5,-42.7 -1,-37 c 0,0 0.2,-17.8 -0.4,-22 -0.1,-0.9 -0.4,-1.6 -0.7,-2.2 0,-0.1 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.2 -0.1,-0.2 -0.7,-1.2 -1.8,-2.1 -3.1,-2.6 -1.4,-0.5 -2.9,-0.4 -4.2,0.2 0,0 -0.1,0 -0.1,0 -0.2,0.1 -0.3,0.1 -0.4,0.2 -0.6,0.3 -1.2,0.7 -1.8,1.3 -3,3 -13.7,17.2 -13.7,17.2 l -23.2,28.8 -27.1,33 -46.5,57.8 c 0,0 -21.3,26.6 -16.6,59.4 4.7,32.8 29.1,48.7 48,55.1 18.9,6.4 48,8.5 71.6,-14.7 23.5,-23 22.7,-57.1 22.7,-57.1 z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 500 500"
style="enable-background:new 0 0 500 500;"
xml:space="preserve"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="MenuIconMention.svg"><metadata
id="metadata14"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs12"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4148"><g
id="g4150"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"
transform="matrix(0.99998928,0,0,0.99998928,-0.01497322,0.02529433)"><g
id="g4152"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"><path
id="path4154"
class="st0"
d="m 396.9,47.7 2.6,53.1 c 43,47.5 60,114.8 38.6,178.1 C 406.1,373.3 300.7,423 202.7,389.8 104.7,356.6 51.1,253.1 83,158.7 104.5,95.2 159.2,52 222.5,40.5 L 256.7,0.1 C 150,-2.8 49.3,63.4 13.3,169.9 -31,300.6 39.1,442.5 169.9,486.7 300.7,530.9 442.5,460.9 486.8,330.1 522.7,223.9 483.1,110.3 396.9,47.7 Z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g><path
id="path4156"
class="st0"
d="m 335.6,204.3 -1.8,-74.2 -1.5,-42.7 -1,-37 c 0,0 0.2,-17.8 -0.4,-22 -0.1,-0.9 -0.4,-1.6 -0.7,-2.2 0,-0.1 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.2 -0.1,-0.2 -0.7,-1.2 -1.8,-2.1 -3.1,-2.6 -1.4,-0.5 -2.9,-0.4 -4.2,0.2 0,0 -0.1,0 -0.1,0 -0.2,0.1 -0.3,0.1 -0.4,0.2 -0.6,0.3 -1.2,0.7 -1.8,1.3 -3,3 -13.7,17.2 -13.7,17.2 l -23.2,28.8 -27.1,33 -46.5,57.8 c 0,0 -21.3,26.6 -16.6,59.4 4.7,32.8 29.1,48.7 48,55.1 18.9,6.4 48,8.5 71.6,-14.7 23.5,-23 22.7,-57.1 22.7,-57.1 z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g></clipPath></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1278"
inkscape:window-height="1368"
id="namedview10"
showgrid="false"
inkscape:zoom="0.472"
inkscape:cx="-2.7751473"
inkscape:cy="250"
inkscape:window-x="1273"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><style
type="text/css"
id="style4"> .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#222222;} </style><path
style="opacity:1;fill:#000000;fill-opacity:0.7019608;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M -62.5 -62.5 L -62.5 562.5 L 562.5 562.5 L 562.5 -62.5 L -62.5 -62.5 z M 343.75 156.25 A 187.5 187.5 0 0 1 531.25 343.75 A 187.5 187.5 0 0 1 343.75 531.25 A 187.5 187.5 0 0 1 156.25 343.75 A 187.5 187.5 0 0 1 343.75 156.25 z "
id="rect4141"
clip-path="url(#clipPath4148)" /><circle
style="opacity:1;fill:#ff1744;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4137"
cx="343.75"
cy="343.75"
r="156.25" /></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 500 500"
style="enable-background:new 0 0 500 500;"
xml:space="preserve"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="MenuIconUnread.svg"><metadata
id="metadata14"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs12"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4148"><g
id="g4150"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"
transform="matrix(0.99998928,0,0,0.99998928,-0.01497322,0.02529433)"><g
id="g4152"
style="fill:#000000;fill-opacity:0.70196078;stroke:none"><path
id="path4154"
class="st0"
d="m 396.9,47.7 2.6,53.1 c 43,47.5 60,114.8 38.6,178.1 C 406.1,373.3 300.7,423 202.7,389.8 104.7,356.6 51.1,253.1 83,158.7 104.5,95.2 159.2,52 222.5,40.5 L 256.7,0.1 C 150,-2.8 49.3,63.4 13.3,169.9 -31,300.6 39.1,442.5 169.9,486.7 300.7,530.9 442.5,460.9 486.8,330.1 522.7,223.9 483.1,110.3 396.9,47.7 Z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g><path
id="path4156"
class="st0"
d="m 335.6,204.3 -1.8,-74.2 -1.5,-42.7 -1,-37 c 0,0 0.2,-17.8 -0.4,-22 -0.1,-0.9 -0.4,-1.6 -0.7,-2.2 0,-0.1 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.2 -0.1,-0.2 -0.7,-1.2 -1.8,-2.1 -3.1,-2.6 -1.4,-0.5 -2.9,-0.4 -4.2,0.2 0,0 -0.1,0 -0.1,0 -0.2,0.1 -0.3,0.1 -0.4,0.2 -0.6,0.3 -1.2,0.7 -1.8,1.3 -3,3 -13.7,17.2 -13.7,17.2 l -23.2,28.8 -27.1,33 -46.5,57.8 c 0,0 -21.3,26.6 -16.6,59.4 4.7,32.8 29.1,48.7 48,55.1 18.9,6.4 48,8.5 71.6,-14.7 23.5,-23 22.7,-57.1 22.7,-57.1 z"
style="clip-rule:evenodd;fill:#000000;fill-opacity:0.70196078;fill-rule:evenodd;stroke:none"
inkscape:connector-curvature="0" /></g></clipPath></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1278"
inkscape:window-height="1368"
id="namedview10"
showgrid="false"
inkscape:zoom="0.472"
inkscape:cx="-2.7751473"
inkscape:cy="250"
inkscape:window-x="1273"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><style
type="text/css"
id="style4"> .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#222222;} </style><path
style="opacity:1;fill:#000000;fill-opacity:0.7019608;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M -62.5 -62.5 L -62.5 562.5 L 562.5 562.5 L 562.5 -62.5 L -62.5 -62.5 z M 343.75 156.25 A 187.5 187.5 0 0 1 531.25 343.75 A 187.5 187.5 0 0 1 343.75 531.25 A 187.5 187.5 0 0 1 156.25 343.75 A 187.5 187.5 0 0 1 343.75 156.25 z "
id="rect4141"
clip-path="url(#clipPath4148)" /><circle
style="opacity:1;fill:#00e5ff;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4137"
cx="343.75"
cy="343.75"
r="156.25" /></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,15 +1,18 @@
'use strict';
const electron = require('electron');
const app = electron.app; // Module to control application life.
const {
app,
BrowserWindow,
Menu,
Tray,
ipcMain,
nativeImage,
dialog,
systemPreferences
} = require('electron');
if (require('electron-squirrel-startup')) app.quit();
const BrowserWindow = electron.BrowserWindow; // Module to create native browser window.
const Menu = electron.Menu;
const Tray = electron.Tray;
const ipc = electron.ipcMain;
const nativeImage = electron.nativeImage;
const fs = require('fs');
const path = require('path');
@@ -49,6 +52,20 @@ catch (e) {
console.log('Failed to read or upgrade config.json');
}
// Only for OS X
const switchMenuIconImages = function(icons, isDarkMode) {
if (isDarkMode) {
icons.normal = icons.clicked.normal;
icons.unread = icons.clicked.unread;
icons.mention = icons.clicked.mention;
}
else {
icons.normal = icons.light.normal;
icons.unread = icons.light.unread;
icons.mention = icons.light.mention;
}
};
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
var mainWindow = null;
@@ -62,11 +79,20 @@ const trayImages = function() {
mention: nativeImage.createFromPath(path.resolve(__dirname, 'resources/windows/tray_mention.ico'))
};
case 'darwin':
return {
normal: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/MenuIconTemplate.png')),
unread: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/MenuIconUnreadTemplate.png')),
mention: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/MenuIconMentionTemplate.png'))
const icons = {
light: {
normal: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/MenuIcon.png')),
unread: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/MenuIconUnread.png')),
mention: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/MenuIconMention.png'))
},
clicked: {
normal: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/ClickedMenuIcon.png')),
unread: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/ClickedMenuIconUnread.png')),
mention: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/ClickedMenuIconMention.png'))
}
};
switchMenuIconImages(icons, systemPreferences.isDarkMode());
return icons;
case 'linux':
var resourcesDir = 'resources/linux/' + (config.trayIconTheme || 'light') + '/';
return {
@@ -129,7 +155,7 @@ app.on('certificate-error', function(event, webContents, url, error, certificate
detail = `Certificate is different from previous one.\n\n` + detail;
}
electron.dialog.showMessageBox(mainWindow, {
dialog.showMessageBox(mainWindow, {
title: 'Certificate error',
message: `Do you trust certificate from "${certificate.issuerName}"?`,
detail: detail,
@@ -152,7 +178,7 @@ app.on('certificate-error', function(event, webContents, url, error, certificate
const loginCallbackMap = new Map();
ipc.on('login-credentials', function(event, request, user, password) {
ipcMain.on('login-credentials', function(event, request, user, password) {
const callback = loginCallbackMap.get(JSON.stringify(request));
if (callback != null) {
callback(user, password);
@@ -173,6 +199,14 @@ app.on('ready', function() {
if (shouldShowTrayIcon()) {
// set up tray icon
trayIcon = new Tray(trayImages.normal);
if (process.platform === 'darwin') {
trayIcon.setPressedImage(trayImages.clicked.normal);
systemPreferences.subscribeNotification('AppleInterfaceThemeChangedNotification', (event, userInfo) => {
switchMenuIconImages(trayImages, systemPreferences.isDarkMode());
trayIcon.setImage(trayImages.normal);
});
}
trayIcon.setToolTip(app.getName());
trayIcon.on('click', function() {
mainWindow.focus();
@@ -183,7 +217,7 @@ app.on('ready', function() {
trayIcon.on('balloon-click', function() {
mainWindow.focus();
});
ipc.on('notified', function(event, arg) {
ipcMain.on('notified', function(event, arg) {
trayIcon.displayBalloon({
icon: path.resolve(__dirname, 'resources/appicon.png'),
title: arg.title,
@@ -193,22 +227,31 @@ app.on('ready', function() {
// Set overlay icon from dataURL
// Set trayicon to show "dot"
ipc.on('update-unread', function(event, arg) {
ipcMain.on('update-unread', function(event, arg) {
if (process.platform === 'win32') {
const overlay = arg.overlayDataURL ? electron.nativeImage.createFromDataURL(arg.overlayDataURL) : null;
const overlay = arg.overlayDataURL ? nativeImage.createFromDataURL(arg.overlayDataURL) : null;
mainWindow.setOverlayIcon(overlay, arg.description);
}
if (arg.mentionCount > 0) {
trayIcon.setImage(trayImages.mention);
if (process.platform === 'darwin') {
trayIcon.setPressedImage(trayImages.clicked.mention);
}
trayIcon.setToolTip(arg.mentionCount + ' unread mentions');
}
else if (arg.unreadCount > 0) {
trayIcon.setImage(trayImages.unread);
if (process.platform === 'darwin') {
trayIcon.setPressedImage(trayImages.clicked.unread);
}
trayIcon.setToolTip(arg.unreadCount + ' unread channels');
}
else {
trayIcon.setImage(trayImages.normal);
if (process.platform === 'darwin') {
trayIcon.setPressedImage(trayImages.clicked.normal);
}
trayIcon.setToolTip(app.getName());
}
});
@@ -241,11 +284,11 @@ app.on('ready', function() {
mainWindow.loadURL('file://' + __dirname + '/browser/index.html');
// Set application menu
ipc.on('update-menu', (event, config) => {
ipcMain.on('update-menu', (event, config) => {
var app_menu = appMenu.createMenu(mainWindow, config);
Menu.setApplicationMenu(app_menu);
});
ipc.emit('update-menu', true, config);
ipcMain.emit('update-menu', true, config);
// set up context menu for tray icon
if (shouldShowTrayIcon()) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB