Fix off-by-one issue for odd/even tabs

This commit is contained in:
Florian Bruhin 2017-09-18 14:29:14 +02:00
parent 8e2b2d113b
commit ee4d92364e

View File

@ -558,7 +558,7 @@ class TabBar(QTabBar):
# pylint: enable=bad-config-option
if idx == selected:
setting = setting.selected
setting = setting.odd if idx % 2 else setting.even
setting = setting.odd if (idx + 1) % 2 else setting.even
tab.palette.setColor(QPalette.Window, setting.bg)
tab.palette.setColor(QPalette.WindowText, setting.fg)