diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 86b135e93..48f331256 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -162,7 +162,9 @@ |<>|Foreground color of the URL in the statusbar on error. |<>|Foreground color of the URL in the statusbar when there's a warning. |<>|Foreground color of the URL in the statusbar for hovered links. -|<>|Foreground color of tabs. +|<>|Foreground color of unselected odd tabs. +|<>|Foreground color of unselected even tabs. +|<>|Foreground color of selected tabs. |<>|Background color of unselected odd tabs. |<>|Background color of unselected even tabs. |<>|Background color of selected tabs. @@ -990,9 +992,21 @@ Foreground color of the URL in the statusbar for hovered links. Default: +pass:[aqua]+ -[[colors-tab.fg]] -=== tab.fg -Foreground color of tabs. +[[colors-tab.fg.odd]] +=== tab.fg.odd +Foreground color of unselected odd tabs. + +Default: +pass:[white]+ + +[[colors-tab.fg.even]] +=== tab.fg.even +Foreground color of unselected even tabs. + +Default: +pass:[white]+ + +[[colors-tab.fg.selected]] +=== tab.fg.selected +Foreground color of selected tabs. Default: +pass:[white]+ diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 91ef0cee1..eba965ad1 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -645,9 +645,17 @@ DATA = collections.OrderedDict([ SettingValue(typ.QssColor(), 'aqua'), "Foreground color of the URL in the statusbar for hovered links."), - ('tab.fg', + ('tab.fg.odd', SettingValue(typ.QtColor(), 'white'), - "Foreground color of tabs."), + "Foreground color of unselected odd tabs."), + + ('tab.fg.even', + SettingValue(typ.QtColor(), 'white'), + "Foreground color of unselected even tabs."), + + ('tab.fg.selected', + SettingValue(typ.QtColor(), 'white'), + "Foreground color of selected tabs."), ('tab.bg.odd', SettingValue(typ.QtColor(), 'grey'), diff --git a/qutebrowser/widgets/tabwidget.py b/qutebrowser/widgets/tabwidget.py index 3e9dd72c3..ed38c4517 100644 --- a/qutebrowser/widgets/tabwidget.py +++ b/qutebrowser/widgets/tabwidget.py @@ -228,14 +228,16 @@ class TabBar(QTabBar): for idx in range(self.count()): self.initStyleOption(tab, idx) if idx == selected: - color = config.get('colors', 'tab.bg.selected') + bg_color = config.get('colors', 'tab.bg.selected') + fg_color = config.get('colors', 'tab.fg.selected') elif idx % 2: - color = config.get('colors', 'tab.bg.odd') + bg_color = config.get('colors', 'tab.bg.odd') + fg_color = config.get('colors', 'tab.fg.odd') else: - color = config.get('colors', 'tab.bg.even') - tab.palette.setColor(QPalette.Window, color) - tab.palette.setColor(QPalette.WindowText, - config.get('colors', 'tab.fg')) + bg_color = config.get('colors', 'tab.bg.even') + fg_color = config.get('colors', 'tab.fg.even') + tab.palette.setColor(QPalette.Window, bg_color) + tab.palette.setColor(QPalette.WindowText, fg_color) indicator_color = self.tabData(idx) if indicator_color is None: indicator_color = QColor()