Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Commit

Permalink
better touchbar icons
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-sap committed Mar 12, 2017
1 parent fcbb74b commit a507315
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 21 deletions.
33 changes: 13 additions & 20 deletions app/touchbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ const $ = require('../util');
let btnBookmark;

function initBar () {
// const btnBack = new TouchBarButton({
// label: '←',
// click: () => $.trigger(EVENT.frame.goto, 'prev')
// });
// const btnForward = new TouchBarButton({
// label: '→',
// click: () => $.trigger(EVENT.frame.goto, 'next')
// });
const btnRefreshSidebar = new TouchBarButton({
icon: './assets/tb-refresh.png',
backgroundColor: '#2C384D',
click: refreshSidebar
});

const btnRefresh = new TouchBarButton({
label: '',
icon: './assets/tb-refresh.png',
click: () => $.trigger(EVENT.frame.goto, 'refresh')
});

btnBookmark = new TouchBarButton({
label: '',
icon: './assets/tb-bookmark-outline.png',
click: () => $.trigger(EVENT.bookmark.toggle)
});

Expand All @@ -34,17 +32,9 @@ function initBar () {
click: () => $.trigger(EVENT.address.issueFocus)
});

const btnRefreshSidebar = new TouchBarButton({
label: '↻',
backgroundColor: '#2C384D',
click: refreshSidebar
});

return new TouchBar([
btnRefreshSidebar,
new TouchBarSpacer({ size: 'medium' }),
// btnBack,
// btnForward,
btnAddressbar,
btnIssueNo,
btnRefresh,
Expand All @@ -55,8 +45,11 @@ function initBar () {


function bookmarkExists (exists) {
btnBookmark.label = exists ? '★' : '☆';
btnBookmark.backgroundColor = exists ? '#E7837C' : '#444';
const icons = {
empty: './assets/tb-bookmark-outline.png',
full: './assets/tb-bookmark.png',
};
btnBookmark.icon = exists ? icons.full : icons.empty;
}


Expand Down
Binary file added assets/tb-bookmark-outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tb-bookmark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tb-refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const {app, BrowserWindow} = require('electron');
const windowStateKeeper = require('electron-window-state');
const EVENT = require('./app/db/events');
const EVENT = require('./app/services/events');
const updater = require('./app/updater/main');


const send = (name, val) => win.webContents.send(name, val);

let win;
Expand Down

0 comments on commit a507315

Please sign in to comment.