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

Commit 823f38c

Browse files
authored
Merge pull request #8166 from cezaraugusto/tabsbar/8115
Add fontWeight when tabTitle is white on macOS
2 parents e169b32 + 3cda982 commit 823f38c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/renderer/components/tabContent.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const React = require('react')
66
const ImmutableComponent = require('../../../js/components/immutableComponent')
77
const {StyleSheet, css} = require('aphrodite/no-important')
88
const globalStyles = require('./styles/global')
9-
const {isWindows} = require('../../common/lib/platformUtil')
9+
const {isWindows, isDarwin} = require('../../common/lib/platformUtil')
1010
const {tabs} = require('../../../js/constants/config')
1111
const {hasBreakpoint, hasRelativeCloseIcon,
1212
hasFixedCloseIcon, hasVisibleSecondaryIcon, getTabIconColor} = require('../lib/tabUtil')
@@ -207,6 +207,8 @@ class TabTitle extends ImmutableComponent {
207207
}
208208

209209
render () {
210+
// Brad said that tabs with white title on macOS look too thin
211+
const enforceFontVisibilty = isDarwin() && getTabIconColor(this.props) === 'white'
210212
const titleStyles = StyleSheet.create({
211213
gradientText: {
212214
backgroundImage: `-webkit-linear-gradient(left,
@@ -219,6 +221,7 @@ class TabTitle extends ImmutableComponent {
219221
className={css(
220222
styles.tabTitle,
221223
titleStyles.gradientText,
224+
enforceFontVisibilty && styles.enforceFontVisibilty,
222225
// Windows specific style
223226
isWindows() && styles.tabTitleForWindows
224227
)}>
@@ -335,6 +338,10 @@ const styles = StyleSheet.create({
335338
WebkitBackgroundClip: 'text'
336339
},
337340

341+
enforceFontVisibilty: {
342+
fontWeight: '600'
343+
},
344+
338345
tabTitleForWindows: {
339346
fontWeight: '500',
340347
fontSize: globalStyles.fontSize.tabTitle

0 commit comments

Comments
 (0)