Indent QTabBar style definitions

This commit is contained in:
Matthias Metelka 2023-01-12 22:41:18 +01:00
parent 9f6db2c208
commit a4541997af

View file

@ -254,38 +254,38 @@ class CustomStyles:
def tabwidget(self, tm: ThemeManager) -> str: def tabwidget(self, tm: ThemeManager) -> str:
return f""" return f"""
QTabWidget {{ QTabWidget {{
border-radius: {tm.var(props.BORDER_RADIUS)}; border-radius: {tm.var(props.BORDER_RADIUS)};
background: none; background: none;
}} }}
QTabWidget::pane {{ QTabWidget::pane {{
top: -15px; top: -15px;
padding-top: 1em; padding-top: 1em;
background: {tm.var(colors.CANVAS_ELEVATED)}; background: {tm.var(colors.CANVAS_ELEVATED)};
border: 1px solid {tm.var(colors.BORDER_SUBTLE)}; border: 1px solid {tm.var(colors.BORDER_SUBTLE)};
border-radius: {tm.var(props.BORDER_RADIUS)}; border-radius: {tm.var(props.BORDER_RADIUS)};
}} }}
QTabWidget::tab-bar {{ QTabWidget::tab-bar {{
alignment: center; alignment: center;
}} }}
QTabBar::tab {{ QTabBar::tab {{
background: none; background: none;
padding: 4px 8px; padding: 4px 8px;
min-width: 8ex; min-width: 8ex;
}} }}
QTabBar::tab {{ QTabBar::tab {{
border: 1px solid {tm.var(colors.BORDER_SUBTLE)}; border: 1px solid {tm.var(colors.BORDER_SUBTLE)};
border-bottom-color: {tm.var(colors.SHADOW)}; border-bottom-color: {tm.var(colors.SHADOW)};
}} }}
QTabBar::tab:first {{ QTabBar::tab:first {{
border-top-{tm.left()}-radius: {tm.var(props.BORDER_RADIUS)}; border-top-{tm.left()}-radius: {tm.var(props.BORDER_RADIUS)};
border-bottom-{tm.left()}-radius: {tm.var(props.BORDER_RADIUS)}; border-bottom-{tm.left()}-radius: {tm.var(props.BORDER_RADIUS)};
}} }}
QTabBar::tab:!first {{ QTabBar::tab:!first {{
margin-{tm.left()}: -1px; margin-{tm.left()}: -1px;
}} }}
QTabBar::tab:last {{ QTabBar::tab:last {{
border-top-{tm.right()}-radius: {tm.var(props.BORDER_RADIUS)}; border-top-{tm.right()}-radius: {tm.var(props.BORDER_RADIUS)};
border-bottom-{tm.right()}-radius: {tm.var(props.BORDER_RADIUS)}; border-bottom-{tm.right()}-radius: {tm.var(props.BORDER_RADIUS)};
}} }}
QTabBar::tab:selected {{ QTabBar::tab:selected {{
color: white; color: white;