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

Commit

Permalink
Fix app bar color is inconsistent on Windows & Linux (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
quanglam2807 authored Jun 15, 2020
1 parent ad3b0e9 commit 9ba6234
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/components/pages/history/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ const styles = (theme) => ({
marginTop: 12,
},
appBarColorDefault: {
background: theme.palette.type === 'dark' ? theme.palette.grey[900] : theme.palette.primary.main,
color: theme.palette.type === 'dark' ? theme.palette.getContrastText(theme.palette.grey[900]) : theme.palette.primary.contrastText,
// eslint-disable-next-line no-nested-ternary
background: theme.palette.type === 'dark' ? theme.palette.grey[900] : (window.process.platform === 'darwin' ? theme.palette.primary.main : null),
// eslint-disable-next-line no-nested-ternary
color: theme.palette.type === 'dark' ? theme.palette.getContrastText(theme.palette.grey[900]) : (window.process.platform === 'darwin' ? theme.palette.primary.contrastText : null),
},
title: {
flex: 1,
Expand Down
6 changes: 4 additions & 2 deletions src/components/pages/phrasebook/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ const styles = (theme) => ({
marginTop: 12,
},
appBarColorDefault: {
background: theme.palette.type === 'dark' ? theme.palette.grey[900] : theme.palette.primary.main,
color: theme.palette.type === 'dark' ? theme.palette.getContrastText(theme.palette.grey[900]) : theme.palette.primary.contrastText,
// eslint-disable-next-line no-nested-ternary
background: theme.palette.type === 'dark' ? theme.palette.grey[900] : (window.process.platform === 'darwin' ? theme.palette.primary.main : null),
// eslint-disable-next-line no-nested-ternary
color: theme.palette.type === 'dark' ? theme.palette.getContrastText(theme.palette.grey[900]) : (window.process.platform === 'darwin' ? theme.palette.primary.contrastText : null),
},
title: {
flex: 1,
Expand Down
7 changes: 4 additions & 3 deletions src/components/pages/preferences/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ const styles = (theme) => ({
color: theme.palette.text.secondary,
},
appBarColorDefault: {
background: theme.palette.type === 'dark' ? theme.palette.grey[900] : theme.palette.primary.main,
color: theme.palette.type === 'dark' ? theme.palette.getContrastText(theme.palette.grey[900]) : theme.palette.primary.contrastText,

// eslint-disable-next-line no-nested-ternary
background: theme.palette.type === 'dark' ? theme.palette.grey[900] : (window.process.platform === 'darwin' ? theme.palette.primary.main : null),
// eslint-disable-next-line no-nested-ternary
color: theme.palette.type === 'dark' ? theme.palette.getContrastText(theme.palette.grey[900]) : (window.process.platform === 'darwin' ? theme.palette.primary.contrastText : null),
},
title: {
flex: 1,
Expand Down

0 comments on commit 9ba6234

Please sign in to comment.