1- from Qt import QtWidgets
1+ from Qt import QtWidgets , QtGui
22
33from NodeGraphQt .constants import (
44 NODE_SEL_BORDER_COLOR ,
55 VIEWER_BG_COLOR ,
6- VIEWER_GRID_COLOR
6+ VIEWER_NAV_BG_COLOR
77)
88from NodeGraphQt .widgets .viewer_nav import NodeNavigationWidget
99
@@ -15,28 +15,33 @@ def __init__(self, parent=None):
1515 self .setTabsClosable (True )
1616 self .setTabBarAutoHide (True )
1717 text_color = self .palette ().text ().color ().toTuple ()
18+ bg_color = QtGui .QColor (* VIEWER_BG_COLOR ).darker (120 ).toTuple ()
1819 style_dict = {
20+ 'QWidget' : {
21+ 'background-color' : 'rgb({0},{1},{2})' .format (* VIEWER_BG_COLOR ),
22+ },
1923 'QTabWidget::pane' : {
2024 'background' : 'rgb({0},{1},{2})' .format (* VIEWER_BG_COLOR ),
2125 'border' : '0px' ,
22- 'border-top' : '1px solid rgb({0},{1},{2})'
23- .format (* VIEWER_BG_COLOR ),
26+ 'border-top' : '0px solid rgb({0},{1},{2})' .format (* bg_color ),
2427 },
2528 'QTabBar::tab' : {
26- 'background' : 'rgb({0},{1},{2})' .format (* VIEWER_BG_COLOR ),
29+ 'background' : 'rgb({0},{1},{2})' .format (* bg_color ),
2730 'border' : '0px solid black' ,
28- 'color' : 'rgba({0},{1},{2},45 )' .format (* text_color ),
31+ 'color' : 'rgba({0},{1},{2},30 )' .format (* text_color ),
2932 'min-width' : '10px' ,
30- 'padding' : '8px 20px' ,
33+ 'padding' : '10px 20px' ,
3134 },
3235 'QTabBar::tab:selected' : {
3336 'color' : 'rgb({0},{1},{2})' .format (* text_color ),
34- 'background' : 'rgb({0},{1},{2})' .format (* VIEWER_BG_COLOR ),
35- 'margin-bottom' : '-1px' ,
37+ 'background' : 'rgb({0},{1},{2})' .format (* VIEWER_NAV_BG_COLOR ),
38+ 'border-top' : '1px solid rgb({0},{1},{2})'
39+ .format (* NODE_SEL_BORDER_COLOR ),
3640 },
3741 'QTabBar::tab:hover' : {
38- 'color' : 'rgb({0}, {1}, {2})' .format (* NODE_SEL_BORDER_COLOR ),
39- 'background' : 'rgb({0}, {1}, {2})' .format (* VIEWER_GRID_COLOR ),
42+ 'color' : 'rgb({0},{1},{2})' .format (* text_color ),
43+ 'border-top' : '1px solid rgb({0},{1},{2})'
44+ .format (* NODE_SEL_BORDER_COLOR ),
4045 }
4146 }
4247 stylesheet = ''
0 commit comments