Restyle tabbar
This commit is contained in:
parent
11bd966e1e
commit
fb9ac1bc4c
1
THANKS
1
THANKS
@ -24,6 +24,7 @@ valuable ones:
|
|||||||
- andrean
|
- andrean
|
||||||
- chelmuth
|
- chelmuth
|
||||||
- quark
|
- quark
|
||||||
|
- Bleeding Fingers
|
||||||
|
|
||||||
Thanks to these people for helpful bits and pieces in the Qt bugtracker and IRC
|
Thanks to these people for helpful bits and pieces in the Qt bugtracker and IRC
|
||||||
channel:
|
channel:
|
||||||
|
@ -497,18 +497,22 @@ DATA = OrderedDict([
|
|||||||
|
|
||||||
('tab.fg',
|
('tab.fg',
|
||||||
SettingValue(types.Color(), "white"),
|
SettingValue(types.Color(), "white"),
|
||||||
"Foreground color of the tabbar."),
|
"Foreground color of tabs."),
|
||||||
|
|
||||||
('tab.bg',
|
('tab.bg',
|
||||||
SettingValue(types.Color(), "grey"),
|
SettingValue(types.Color(), "grey"),
|
||||||
"Background color of the tabbar."),
|
"Background color of unselected tabs."),
|
||||||
|
|
||||||
('tab.bg.selected',
|
('tab.bg.selected',
|
||||||
SettingValue(types.Color(), "black"),
|
SettingValue(types.Color(), "black"),
|
||||||
"Background color of the tabbar for the selected tab."),
|
"Background color of selected tabs."),
|
||||||
|
|
||||||
|
('tab.bg.bar',
|
||||||
|
SettingValue(types.Color(), "#555555"),
|
||||||
|
"Background color of the tabbar."),
|
||||||
|
|
||||||
('tab.seperator',
|
('tab.seperator',
|
||||||
SettingValue(types.Color(), "white"),
|
SettingValue(types.Color(), "#555555"),
|
||||||
"Color for the tab seperator."),
|
"Color for the tab seperator."),
|
||||||
|
|
||||||
('hints.fg',
|
('hints.fg',
|
||||||
|
@ -33,9 +33,6 @@ class TabWidget(QTabWidget):
|
|||||||
STYLESHEET: The stylesheet template to be used.
|
STYLESHEET: The stylesheet template to be used.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# FIXME there is still some ugly 1px white stripe from somewhere if we do
|
|
||||||
# background-color: grey for QTabBar...
|
|
||||||
|
|
||||||
STYLESHEET = """
|
STYLESHEET = """
|
||||||
QTabWidget::pane {{
|
QTabWidget::pane {{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -44,6 +41,7 @@ class TabWidget(QTabWidget):
|
|||||||
|
|
||||||
QTabBar {{
|
QTabBar {{
|
||||||
{font[tabbar]}
|
{font[tabbar]}
|
||||||
|
{color[tab.bg.bar]}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
QTabBar::tab {{
|
QTabBar::tab {{
|
||||||
@ -53,9 +51,6 @@ class TabWidget(QTabWidget):
|
|||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
}}
|
|
||||||
|
|
||||||
QTabBar::tab:first, QTabBar::tab:middle {{
|
|
||||||
border-right: 1px solid {color[tab.seperator]};
|
border-right: 1px solid {color[tab.seperator]};
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@ -71,6 +66,7 @@ class TabWidget(QTabWidget):
|
|||||||
set_register_stylesheet(self)
|
set_register_stylesheet(self)
|
||||||
self.setDocumentMode(True)
|
self.setDocumentMode(True)
|
||||||
self.setElideMode(Qt.ElideRight)
|
self.setElideMode(Qt.ElideRight)
|
||||||
|
self.tabBar().setDrawBase(False)
|
||||||
self._init_config()
|
self._init_config()
|
||||||
|
|
||||||
def _init_config(self):
|
def _init_config(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user