From c041f2007fa7507e4c7e8416e6208b57f02ef0f6 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sun, 19 May 2019 23:06:34 +0200 Subject: [PATCH 1/3] change primary color based on system accent color --- package.json | 2 +- src/app/App.css | 5 +++-- src/app/components/Ticker.css | 18 --------------- src/app/components/Ticker.jsx | 19 ++++++++++++---- src/app/components/Touchbar.js | 10 +++++---- src/app/components/Welcome.css | 1 + src/app/components/Welcome.jsx | 9 +++++++- src/app/screens/Home.css | 12 ---------- src/app/screens/Preferences.css | 9 -------- src/app/screens/Preferences.jsx | 2 ++ src/app/store/AppProvider.jsx | 8 ++++++- src/main.js | 40 +++++++++++++++++++++++++++------ src/utils.js | 11 ++++++++- 13 files changed, 86 insertions(+), 60 deletions(-) diff --git a/package.json b/package.json index 553ea54..34deb92 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "babel-loader": "^8.0.6", "copy-webpack-plugin": "^5.0.3", "css-loader": "^2.1.1", - "electron": "^5.0.1", + "electron": "^6.0.0-beta.3", "electron-builder": "^20.40.2", "electron-devtools-installer": "^2.2.4", "electron-store": "^3.2.0", diff --git a/src/app/App.css b/src/app/App.css index f2dc3f0..85dd15f 100644 --- a/src/app/App.css +++ b/src/app/App.css @@ -58,9 +58,10 @@ h5 { font-weight: 700; } -a { - color: #f6388a; +a, +button { text-decoration: none; + cursor: default; } a h1 { diff --git a/src/app/components/Ticker.css b/src/app/components/Ticker.css index 033e2db..11807f2 100644 --- a/src/app/components/Ticker.css +++ b/src/app/components/Ticker.css @@ -31,24 +31,6 @@ border-color: #303030; } -.ticker button:not(:disabled):hover { - border-color: #f6388a; - color: #f6388a; -} - -.ticker button.active, -.ticker button.active:hover { - border-color: #e2e2e2; - background: #f6388a; - color: #fff; -} - -.dark .ticker button.active, -.dark .ticker button.active:hover { - border-color: #303030; - color: #fff !important; -} - .label--price { display: inline-block; font-size: .95rem; diff --git a/src/app/components/Ticker.jsx b/src/app/components/Ticker.jsx index e790286..2cbefb8 100644 --- a/src/app/components/Ticker.jsx +++ b/src/app/components/Ticker.jsx @@ -12,7 +12,19 @@ export default class Ticker extends PureComponent { static contextType = AppContext render() { - const { toggleCurrencies, needsConfig, currency, prices } = this.context + const { + toggleCurrencies, + needsConfig, + currency, + prices, + accentColor + } = this.context + + const activeStyle = { + backgroundColor: accentColor, + color: '#fff', + borderColor: accentColor + } return (