Browse Source

theme: refine sytle of tab bar

Le Tan 7 years ago
parent
commit
52546e4664

+ 27 - 1
src/resources/themes/v_moonlight/v_moonlight.qss

@@ -689,12 +689,27 @@ QTabBar::tab {
     color: @tabbar_fg;
     background: @tabbar_bg;
     border: none;
+    padding: $2px;
+}
+
+QTabBar::tab:top, QTabBar::tab:bottom {
     border-top: $2px solid transparent;
     border-right: $1px solid @tabbar_border;
-    padding: 2px 0px 2px 0px;
     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 {
     color: @tabbar_hover_fg;
     background: @tabbar_hover_bg;
@@ -703,9 +718,20 @@ QTabBar::tab:hover {
 QTabBar::tab:selected {
     color: @tabbar_selected_fg;
     background: @tabbar_selected_bg;
+}
+
+QTabBar::tab:top:selected, QTabBar::tab:bottom:selected {
     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 {
     image: url(close_grey.svg);
 }

+ 27 - 1
src/resources/themes/v_pure/v_pure.qss

@@ -689,12 +689,27 @@ QTabBar::tab {
     color: @tabbar_fg;
     background: @tabbar_bg;
     border: none;
+    padding: $2px;
+}
+
+QTabBar::tab:top, QTabBar::tab:bottom {
     border-top: $2px solid transparent;
     border-right: $1px solid @tabbar_border;
-    padding: 2px 0px 2px 0px;
     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 {
     color: @tabbar_hover_fg;
     background: @tabbar_hover_bg;
@@ -703,9 +718,20 @@ QTabBar::tab:hover {
 QTabBar::tab:selected {
     color: @tabbar_selected_fg;
     background: @tabbar_selected_bg;
+}
+
+QTabBar::tab:top:selected, QTabBar::tab:bottom:selected {
     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 {
     image: url(close_grey.svg);
 }

+ 1 - 1
src/vmainwindow.cpp

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