Skip to content

Commit

Permalink
Use new size for graphic for Rewards Brave Action graphic
Browse files Browse the repository at this point in the history
Size is changed to 18px as per brave/brave-browser#2295
  • Loading branch information
petemill committed Jan 8, 2019
1 parent c02ac82 commit 559e7d0
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ transpile_web_ui("brave_rewards_panel") {
"components/app.tsx",
"components/panel.tsx",
"constants/rewards_panel_types.ts",
"img/rewards-off.png",
"img/rewards-off@2x.png",
"img/rewards-off@3x.png",
"img/rewards-on.png",
"img/rewards-on@2x.png",
"img/rewards-on@3x.png",
"utils.ts",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,32 @@
import './background/store'
import './background/events/rewardsEvents'
import './background/events/tabEvents'
import batIconOn18Url from './img/rewards-on.png'
import batIconOn36Url from './img/rewards-on@2x.png'
import batIconOn54Url from './img/rewards-on@3x.png'
// TODO: display 'off' icon at appropriate time
// import batIconOff18Url from './img/rewards-off.png'
// import batIconOff36Url from './img/rewards-off@2x.png'
// import batIconOff54Url from './img/rewards-off@3x.png'

chrome.browserAction.setBadgeBackgroundColor({ color: '#FF0000' })
const iconOn = {
path: {
18: batIconOn18Url,
36: batIconOn36Url,
54: batIconOn54Url
}
}

// const iconOff = {
// path: {
// 18: batIconOff18Url,
// 36: batIconOff36Url,
// 54: batIconOff54Url
// }
// }

chrome.browserAction.setBadgeBackgroundColor({ color: '#FB542B' })
chrome.browserAction.setIcon(iconOn)

chrome.runtime.onInstalled.addListener(function (details) {
if (details.reason === 'install') {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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 559e7d0

Please sign in to comment.