From 2aabec9d0546989f89c37a48d32626cc0e0d92e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sat, 25 Nov 2017 15:56:49 +0100 Subject: [PATCH] Optimize UI for dark system themes #89 --- src/MainWindow.ui | 18 ++++++++---------- src/widgets/ConsoleWidget.ui | 8 +++++--- src/widgets/Dashboard.ui | 4 ++-- src/widgets/PieView.cpp | 1 + src/widgets/SectionsWidget.cpp | 2 +- src/widgets/SidebarWidget.ui | 6 +----- 6 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/MainWindow.ui b/src/MainWindow.ui index 7f789470..8c90a2ed 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -23,8 +23,7 @@ QHeaderView::section { padding: 3px; padding-left: 10px; - background-color: rgb(232, 232, 232); - border: 2px solid white; +/* border: 2px solid white;*/ } QTabBar @@ -33,8 +32,6 @@ QTabBar } QTabBar::tab { - background: rgb(240, 240, 240); - border: 0px solid #2180a9; border-bottom-color: #2180a9; border-top-left-radius: 0px; border-top-right-radius: 0px; @@ -55,7 +52,6 @@ QTabBar::tab:hover { } QDockWidget::title { - background: rgb(236, 236, 236); text-align: center; } @@ -170,7 +166,7 @@ border-top: 0px; 0 0 1013 - 22 + 23 @@ -184,8 +180,8 @@ border-top: 0px; 419 265 - 173 - 206 + 140 + 239 @@ -296,12 +292,14 @@ border-top: 0px; QToolButton { /* all types of tool button */ border: 0px solid rgb(255, 255, 255); border-radius: 6px; - border-left: 5px solid rgb(255, 255, 255); - border-right: 5px solid rgb(255, 255, 255); margin-bottom: 1px; margin-top: 1px; + margin-left: 2px; + margin-right: 2px; background-color: rgb(255, 255, 255); padding: 2px; + padding-left: 7px; + padding-right: 7px; color: rgb(255, 0, 0); } QToolButton .svg-icon path { diff --git a/src/widgets/ConsoleWidget.ui b/src/widgets/ConsoleWidget.ui index 3f8a6d72..0499ddf3 100644 --- a/src/widgets/ConsoleWidget.ui +++ b/src/widgets/ConsoleWidget.ui @@ -88,7 +88,7 @@ - border-top: 1px solid rgb(255, 255, 255); + /*border-top: 1px solid rgb(255, 255, 255);*/ false @@ -117,10 +117,12 @@ QToolButton { /* all types of tool button */ border-radius: 6px; border-top: 2px solid rgb(255, 255, 255); border-bottom: 2px solid rgb(255, 255, 255); - border-left: 8px solid rgb(255, 255, 255); - border-right: 5px solid rgb(255, 255, 255); + border-left: 2px solid rgb(255, 255, 255); + border-right: 2px solid rgb(255, 255, 255); margin-bottom: 1px; margin-top: 1px; + padding-left: 8px; + padding-right: 5px; background-color: rgb(255, 255, 255); } diff --git a/src/widgets/Dashboard.ui b/src/widgets/Dashboard.ui index 67de0aec..9681a850 100644 --- a/src/widgets/Dashboard.ui +++ b/src/widgets/Dashboard.ui @@ -11,7 +11,7 @@ - background-color: rgb(255, 255, 255); + background-color: palette(base); Dashboard @@ -56,7 +56,7 @@ 0 0 1055 - 980 + 974 diff --git a/src/widgets/PieView.cpp b/src/widgets/PieView.cpp index d7608aab..de290cda 100644 --- a/src/widgets/PieView.cpp +++ b/src/widgets/PieView.cpp @@ -395,6 +395,7 @@ void PieView::paintEvent(QPaintEvent *event) //painter.drawEllipse(meowRect); QPoint p = pieRect.center(); QPoint q(margin - 2, margin - 2); + painter.setBrush(background); painter.drawEllipse(p -= q, pieSize / 4, pieSize / 4); painter.restore(); diff --git a/src/widgets/SectionsWidget.cpp b/src/widgets/SectionsWidget.cpp index cc623275..4da0d575 100644 --- a/src/widgets/SectionsWidget.cpp +++ b/src/widgets/SectionsWidget.cpp @@ -16,7 +16,7 @@ SectionsWidget::SectionsWidget(MainWindow *main, QWidget *parent) : setupViews(); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); //setStyleSheet("QSplitter::handle:horizontal { width: 3px; } QSplitter::handle:vertical { height: 3px; }"); - setStyleSheet("QSplitter::handle { height: 2px; background-color: rgb(255, 255, 255); image: url(:/img/icons/tabs.svg); }"); + //setStyleSheet("QSplitter::handle { height: 2px; background-color: rgb(255, 255, 255); image: url(:/img/icons/tabs.svg); }"); connect(Core(), SIGNAL(refreshAll()), this, SLOT(refreshSections())); } diff --git a/src/widgets/SidebarWidget.ui b/src/widgets/SidebarWidget.ui index 277bb275..339d49b8 100644 --- a/src/widgets/SidebarWidget.ui +++ b/src/widgets/SidebarWidget.ui @@ -83,7 +83,7 @@ 0 0 333 - 816 + 810 @@ -300,10 +300,6 @@ 0 - - background-color: rgb(255, 255, 255); -color: rgb(0, 0, 0); - QFrame::NoFrame