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

Add fontWeight when tabTitle is white on macOS #8166

Merged
merged 1 commit into from
Apr 12, 2017
Merged
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
9 changes: 8 additions & 1 deletion app/renderer/components/tabContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const React = require('react')
const ImmutableComponent = require('../../../js/components/immutableComponent')
const {StyleSheet, css} = require('aphrodite/no-important')
const globalStyles = require('./styles/global')
const {isWindows} = require('../../common/lib/platformUtil')
const {isWindows, isDarwin} = require('../../common/lib/platformUtil')
const {tabs} = require('../../../js/constants/config')
const {hasBreakpoint, hasRelativeCloseIcon,
hasFixedCloseIcon, hasVisibleSecondaryIcon, getTabIconColor} = require('../lib/tabUtil')
Expand Down Expand Up @@ -207,6 +207,8 @@ class TabTitle extends ImmutableComponent {
}

render () {
// Brad said that tabs with white title on macOS look too thin
const enforceFontVisibilty = isDarwin() && getTabIconColor(this.props) === 'white'
const titleStyles = StyleSheet.create({
gradientText: {
backgroundImage: `-webkit-linear-gradient(left,
Expand All @@ -219,6 +221,7 @@ class TabTitle extends ImmutableComponent {
className={css(
styles.tabTitle,
titleStyles.gradientText,
enforceFontVisibilty && styles.enforceFontVisibilty,
// Windows specific style
isWindows() && styles.tabTitleForWindows
)}>
Expand Down Expand Up @@ -335,6 +338,10 @@ const styles = StyleSheet.create({
WebkitBackgroundClip: 'text'
},

enforceFontVisibilty: {
fontWeight: '600'
},

tabTitleForWindows: {
fontWeight: '500',
fontSize: globalStyles.fontSize.tabTitle
Expand Down