Skip to content

Commit

Permalink
Bug 1462790 - Update Save to Pocket icons to use outline icon treatme…
Browse files Browse the repository at this point in the history
…nt. r=jaws

Update the Save to Pocket svg icons in the urlbar, page action panel, and reader view. There's another Save to Pocket icon in activity stream that the bug doesn't mention but that should probably be updated too. I'll make a different revision for it.

Differential Revision: https://phabricator.services.mozilla.com/D2676
  • Loading branch information
0c0w3 committed Aug 2, 2018
1 parent a93edbb commit 35f405d
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 36 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 14 additions & 7 deletions browser/extensions/pocket/bootstrap.js
Expand Up @@ -344,10 +344,13 @@ var PocketReader = {
if (this.hidden) {
Services.mm.broadcastAsyncMessage("Reader:RemoveButton", { id: "pocket-button" });
} else {
Services.mm.broadcastAsyncMessage("Reader:AddButton",
{ id: "pocket-button",
title: gPocketBundle.GetStringFromName("pocket-button.tooltiptext"),
image: "chrome://pocket/content/panels/img/pocket.svg#pocket-mark" });
Services.mm.broadcastAsyncMessage("Reader:AddButton", {
id: "pocket-button",
title: gPocketBundle.GetStringFromName("pocket-button.tooltiptext"),
image: "chrome://pocket/content/panels/img/pocket-outline.svg",
width: 20,
height: 20,
});
}
},
receiveMessage(message) {
Expand All @@ -357,9 +360,13 @@ var PocketReader = {
if (this.hidden)
break;
message.target.messageManager.
sendAsyncMessage("Reader:AddButton", { id: "pocket-button",
title: gPocketBundle.GetStringFromName("pocket-button.tooltiptext"),
image: "chrome://pocket/content/panels/img/pocket.svg#pocket-mark"});
sendAsyncMessage("Reader:AddButton", {
id: "pocket-button",
title: gPocketBundle.GetStringFromName("pocket-button.tooltiptext"),
image: "chrome://pocket/content/panels/img/pocket-outline.svg",
width: 20,
height: 20,
});
break;
}
case "Reader:Clicked-pocket-button": {
Expand Down
12 changes: 12 additions & 0 deletions browser/extensions/pocket/content/panels/img/pocket-outline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 0 additions & 22 deletions browser/extensions/pocket/content/panels/img/pocket.svg

This file was deleted.

13 changes: 13 additions & 0 deletions browser/extensions/pocket/skin/shared/pocket-outline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions browser/extensions/pocket/skin/shared/pocket.css
Expand Up @@ -7,9 +7,14 @@
fill: #fbfbfb;
}

#pocket-button,
#pageAction-panel-pocket {
list-style-image: url("chrome://pocket-shared/skin/pocket-outline.svg");
}

#appMenu-library-pocket-button,
#pageAction-panel-pocket,
#pocket-button {
#pocket-button-box[open="true"] > #pocket-button,
#pocket-button-box[pocketed="true"] > #pocket-button {
list-style-image: url("chrome://pocket-shared/skin/pocket.svg");
}

Expand Down
2 changes: 1 addition & 1 deletion browser/extensions/pocket/skin/shared/pocket.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions toolkit/components/reader/AboutReader.jsm
Expand Up @@ -212,6 +212,8 @@ AboutReader.prototype = {
btn.title = message.data.title;
if (message.data.text)
btn.textContent = message.data.text;
if (message.data.width && message.data.height)
btn.style.backgroundSize = `${message.data.width}px ${message.data.height}px`;
let tb = this._toolbarElement;
tb.appendChild(btn);
this._setupButton(message.data.id, button => {
Expand Down
4 changes: 2 additions & 2 deletions toolkit/themes/shared/aboutReader.css
Expand Up @@ -273,6 +273,8 @@ body:not(.loaded) .toolbar:-moz-locale-dir(rtl) {
border-left: 0;
border-right: 1px solid #b5b5b5;
border-bottom: 1px solid #c1c1c1;
-moz-context-properties: fill;
fill: #808080;
}

.button[hidden] {
Expand Down Expand Up @@ -501,8 +503,6 @@ body:not(.loaded) .toolbar:-moz-locale-dir(rtl) {

.close-button {
background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg");
-moz-context-properties: fill;
fill: #808080;
height: 68px;
background-position: center 8px;
}
Expand Down
2 changes: 1 addition & 1 deletion toolkit/themes/shared/reader/RM-Type-Controls-24x24.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 35f405d

Please sign in to comment.