Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Make private tab color predominant #7722

Merged
merged 1 commit into from
Mar 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/renderer/components/styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const globalStyles = {
color: {
linkColor: '#0099CC',
highlightBlue: '#37A9FD',
privateTabBackground: '#392e54',
privateTabBackground: '#665296',
privateTabBackgroundActive: '#4b3c6e',
bitcoinOrange: '#f7931a',
chromePrimary: '#F3F3F3',
chromeSecondary: '#d3d3d3',
Expand Down
8 changes: 4 additions & 4 deletions app/renderer/components/styles/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ const styles = StyleSheet.create({
},

activePrivateTab: {
background: 'rgb(247, 247, 247)',
color: 'black'
background: globalStyles.color.privateTabBackgroundActive,
color: '#fff'
},

private: {
background: '#9c8dc1', // (globalStyles.color.privateTabBackground, 40%)
background: globalStyles.color.privateTabBackground,
color: '#fff',

':hover': {
background: '#665296', // (globalStyles.color.privateTabBackground, 20%)
background: globalStyles.color.privateTabBackgroundActive,
color: '#fff'
}
},
Expand Down
4 changes: 3 additions & 1 deletion app/renderer/components/tabContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ class TabTitle extends ImmutableComponent {
get themeColor () {
const themeColor = this.props.tabProps.get('themeColor') || this.props.tabProps.get('computedThemeColor')
const defaultColor = this.props.tabProps.get('isPrivate') ? globalStyles.color.white100 : globalStyles.color.black100
return this.props.isActive && this.props.paintTabs && themeColor
const activeNonPrivateTab = !this.props.tabProps.get('isPrivate') && this.props.isActive

return activeNonPrivateTab && this.props.paintTabs && !!themeColor
? getTextColorForBackground(themeColor)
: defaultColor
}
Expand Down
3 changes: 3 additions & 0 deletions js/components/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ class Tab extends ImmutableComponent {
this.props.isActive && this.props.tab.get('isPrivate') && styles.activePrivateTab,
playIndicatorBreakpoint && this.canPlayAudio && styles.narrowViewPlayIndicator,
this.props.isActive && this.themeColor && perPageStyles.themeColor,
// Private color should override themeColor
this.props.tab.get('isPrivate') && styles.private,
this.props.isActive && this.props.tab.get('isPrivate') && styles.activePrivateTab,
!this.isPinned && this.narrowView && styles.tabNarrowView,
!this.isPinned && this.narrowestView && styles.tabNarrowestView,
!this.isPinned && this.props.tab.get('breakpoint') === 'smallest' && styles.tabMinAllowedSize
Expand Down