theme: refine sytle of tab bar

This commit is contained in:
Le Tan 2018-05-18 20:57:50 +08:00
parent c6cc69e176
commit 52546e4664
3 changed files with 55 additions and 3 deletions

View File

@ -689,12 +689,27 @@ QTabBar::tab {
color: @tabbar_fg; color: @tabbar_fg;
background: @tabbar_bg; background: @tabbar_bg;
border: none; border: none;
padding: $2px;
}
QTabBar::tab:top, QTabBar::tab:bottom {
border-top: $2px solid transparent; border-top: $2px solid transparent;
border-right: $1px solid @tabbar_border; border-right: $1px solid @tabbar_border;
padding: 2px 0px 2px 0px;
height: $20px; height: $20px;
} }
QTabBar::tab:right {
border-left: $3px solid transparent;
border-bottom: $1px solid @tabbar_border;
min-width: $20px;
}
QTabBar::tab:left {
border-right: $3px solid transparent;
border-bottom: $1px solid @tabbar_border;
min-width: $20px;
}
QTabBar::tab:hover { QTabBar::tab:hover {
color: @tabbar_hover_fg; color: @tabbar_hover_fg;
background: @tabbar_hover_bg; background: @tabbar_hover_bg;
@ -703,9 +718,20 @@ QTabBar::tab:hover {
QTabBar::tab:selected { QTabBar::tab:selected {
color: @tabbar_selected_fg; color: @tabbar_selected_fg;
background: @tabbar_selected_bg; background: @tabbar_selected_bg;
}
QTabBar::tab:top:selected, QTabBar::tab:bottom:selected {
border-top: $2px solid @master_bg; border-top: $2px solid @master_bg;
} }
QTabBar::tab:right:selected {
border-left: $3px solid @master_bg;
}
QTabBar::tab:left:selected {
border-right: $3px solid @master_bg;
}
QTabBar::close-button { QTabBar::close-button {
image: url(close_grey.svg); image: url(close_grey.svg);
} }

View File

@ -689,12 +689,27 @@ QTabBar::tab {
color: @tabbar_fg; color: @tabbar_fg;
background: @tabbar_bg; background: @tabbar_bg;
border: none; border: none;
padding: $2px;
}
QTabBar::tab:top, QTabBar::tab:bottom {
border-top: $2px solid transparent; border-top: $2px solid transparent;
border-right: $1px solid @tabbar_border; border-right: $1px solid @tabbar_border;
padding: 2px 0px 2px 0px;
height: $20px; height: $20px;
} }
QTabBar::tab:right {
border-left: $3px solid transparent;
border-bottom: $1px solid @tabbar_border;
min-width: $20px;
}
QTabBar::tab:left {
border-right: $3px solid transparent;
border-bottom: $1px solid @tabbar_border;
min-width: $20px;
}
QTabBar::tab:hover { QTabBar::tab:hover {
color: @tabbar_hover_fg; color: @tabbar_hover_fg;
background: @tabbar_hover_bg; background: @tabbar_hover_bg;
@ -703,9 +718,20 @@ QTabBar::tab:hover {
QTabBar::tab:selected { QTabBar::tab:selected {
color: @tabbar_selected_fg; color: @tabbar_selected_fg;
background: @tabbar_selected_bg; background: @tabbar_selected_bg;
}
QTabBar::tab:top:selected, QTabBar::tab:bottom:selected {
border-top: $2px solid @master_bg; border-top: $2px solid @master_bg;
} }
QTabBar::tab:right:selected {
border-left: $3px solid @master_bg;
}
QTabBar::tab:left:selected {
border-right: $3px solid @master_bg;
}
QTabBar::close-button { QTabBar::close-button {
image: url(close_grey.svg); image: url(close_grey.svg);
} }

View File

@ -1245,7 +1245,7 @@ void VMainWindow::initDockWindows()
setTabPosition(Qt::LeftDockWidgetArea, QTabWidget::West); setTabPosition(Qt::LeftDockWidgetArea, QTabWidget::West);
setTabPosition(Qt::RightDockWidgetArea, QTabWidget::East); setTabPosition(Qt::RightDockWidgetArea, QTabWidget::East);
setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North); setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North);
setTabPosition(Qt::BottomDockWidgetArea, QTabWidget::South); setTabPosition(Qt::BottomDockWidgetArea, QTabWidget::North);
setDockNestingEnabled(true); setDockNestingEnabled(true);