From 7783695d8d0fe06a79265e808f4405db63cd7419 Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Tue, 20 Mar 2018 01:46:23 +0100 Subject: [PATCH] ui: New style for tab bar in status view --- bin/app/data/color_schemes/bad_rainbow.xml | 16 ++++- bin/app/data/color_schemes/bright.xml | 16 ++++- bin/app/data/color_schemes/dark.xml | 20 +++++-- bin/app/data/gui/tabbed_view/tabbed_view.css | 61 ++++++++++++-------- src/lib/component/view/TabbedView.cpp | 4 -- src/lib/component/view/TabbedView.h | 3 +- src/lib_gui/qt/view/QtTabbedView.cpp | 4 +- 7 files changed, 82 insertions(+), 42 deletions(-) diff --git a/bin/app/data/color_schemes/bad_rainbow.xml b/bin/app/data/color_schemes/bad_rainbow.xml index c2d3d67f..296ce438 100644 --- a/bin/app/data/color_schemes/bad_rainbow.xml +++ b/bin/app/data/color_schemes/bad_rainbow.xml @@ -473,9 +473,18 @@ #494949 - #D4D4D4 - #878787 - #878787 + + #808080 + #BEBEBE + + @@ -497,6 +506,7 @@ #808080 + #BEBEBE #494949 #D4D4D4 diff --git a/bin/app/data/color_schemes/bright.xml b/bin/app/data/color_schemes/bright.xml index f1e9f7fb..6030bf68 100644 --- a/bin/app/data/color_schemes/bright.xml +++ b/bin/app/data/color_schemes/bright.xml @@ -434,9 +434,18 @@ white - black - #878787 - #878787 + + #E0E0E0 + #BEBEBE + +
@@ -458,6 +467,7 @@ #E0E0E0 + #BEBEBE white black diff --git a/bin/app/data/color_schemes/dark.xml b/bin/app/data/color_schemes/dark.xml index 1fadec42..e39464c7 100644 --- a/bin/app/data/color_schemes/dark.xml +++ b/bin/app/data/color_schemes/dark.xml @@ -444,20 +444,29 @@ #272728 - white - #878787 - #878787 + + #555555 + #BEBEBE + +
#272728 -
white
+ #C5C5C5
white black - darkgrey + #272728 #969696 @@ -468,6 +477,7 @@ #555555 + #BEBEBE #272728 #F7F7F7 diff --git a/bin/app/data/gui/tabbed_view/tabbed_view.css b/bin/app/data/gui/tabbed_view/tabbed_view.css index 2779d9b9..0ecd29fb 100644 --- a/bin/app/data/gui/tabbed_view/tabbed_view.css +++ b/bin/app/data/gui/tabbed_view/tabbed_view.css @@ -1,38 +1,56 @@ +QTabWidget::pane { + background-color: ; + border-top: px solid ; + top: -px; +} + QTabWidget::tab-bar { alignment: left; + left: 7px; + bottom: -1px; } QTabBar::tab { - background-color: ; - color: ; - padding: 12px 75px 5px 12px; - border: 0px; - border-bottom: 4px solid ; + background-color: ; + border-top: 1px solid ; + border-bottom: 1px solid ; + border-top-left-radius: 7px; + border-top-right-radius: 7px; + color: ; + font-size: px; + height: ; + margin-left: 4px; + margin-right: 1px; + margin-top: 4px; + width: 100px; } QTabBar::tab:hover { - border-bottom: 4px solid ; + margin-left: 3px; + margin-right: 0px; + background-color: ; + border: 1px solid ; } -QTabBar::tab:selected { - border-bottom: 4px solid ; - color: ; +QTabBar::tab:selected, QTabBar::tab:pressed { + margin-left: 3px; + margin-right: 0px; + background-color: ; + border: 1px solid ; + border-bottom: 1px solid ; } -QTabWidget::pane { - top: 0px; - background: ; - color: ; - border: 0px; - margin: 0px; - padding: 0px; +QTabWidget #tab_content { + border-top: 1px solid ; + background-color: ; } + QTableView { color: ; background-color: ; alternate-background-color: ; - border-radius: 10px; + border-radius: 7px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border: 1px solid ; @@ -40,10 +58,6 @@ QTableView { font-size: px; } -QFrame { - background-color: ; -} - QTableView::item { border-left: 1px solid ; } @@ -89,16 +103,15 @@ QHeaderView::section:vertical { QTableView QTableCornerButton::section { background-color: ; border-bottom: 1px solid ; - border-top-left-radius: 10px; + border-top-left-radius: 7px; } QCheckBox { color: ; + font-size: px; } #help_button { background: transparent; border: none; - /*margin: none;*/ - /*padding: none;*/ } diff --git a/src/lib/component/view/TabbedView.cpp b/src/lib/component/view/TabbedView.cpp index 1bc2efff..d702e08f 100644 --- a/src/lib/component/view/TabbedView.cpp +++ b/src/lib/component/view/TabbedView.cpp @@ -8,10 +8,6 @@ TabbedView::TabbedView(ViewLayout* viewLayout, const std::string& name) { } -TabbedView::~TabbedView() -{ -} - const std::vector& TabbedView::getViews() const { return m_views; diff --git a/src/lib/component/view/TabbedView.h b/src/lib/component/view/TabbedView.h index 9dc1017e..939284b1 100644 --- a/src/lib/component/view/TabbedView.h +++ b/src/lib/component/view/TabbedView.h @@ -11,9 +11,8 @@ class TabbedView , public ViewLayout { public: - TabbedView(ViewLayout* viewLayout, const std::string& name); - virtual ~TabbedView(); + virtual ~TabbedView() = default; const std::vector& getViews() const; diff --git a/src/lib_gui/qt/view/QtTabbedView.cpp b/src/lib_gui/qt/view/QtTabbedView.cpp index 5bd44872..d8c2fa70 100644 --- a/src/lib_gui/qt/view/QtTabbedView.cpp +++ b/src/lib_gui/qt/view/QtTabbedView.cpp @@ -47,7 +47,9 @@ void QtTabbedView::refreshView() void QtTabbedView::addViewWidget(View* view) { - m_widget->addTab(QtViewWidgetWrapper::getWidgetOfView(view), view->getName().c_str()); + QWidget* tabWidget = QtViewWidgetWrapper::getWidgetOfView(view); + tabWidget->setObjectName("tab_content"); + m_widget->addTab(tabWidget, view->getName().c_str()); setStyleSheet(); }