From afc77f63dbd650383e8baad7716c79842f1b278e Mon Sep 17 00:00:00 2001 From: agilob Date: Tue, 7 Oct 2014 11:50:36 +0200 Subject: [PATCH] css styles for mainHead and mainContent in widget.cpp fixes problems with ugly UI on non-standard system theme. before: https://i.imgur.com/XJ0mbpi.png after: https://imgur.com/a/UbgNz --- res.qrc | 2 ++ ui/settings/mainContent.css | 36 ++++++++++++++++++++++++++++++++++++ ui/settings/mainHead.css | 5 +++++ widget/widget.cpp | 2 ++ 4 files changed, 45 insertions(+) create mode 100644 ui/settings/mainContent.css create mode 100644 ui/settings/mainHead.css diff --git a/res.qrc b/res.qrc index e8156ac58..4ef12f901 100644 --- a/res.qrc +++ b/res.qrc @@ -136,5 +136,7 @@ ui/chatroomWidgets/genericChatroomWidget.css ui/fileTransferInstance/sliverRTEdge.png ui/window/statusPanel.css + ui/settings/mainContent.css + ui/settings/mainHead.css diff --git a/ui/settings/mainContent.css b/ui/settings/mainContent.css new file mode 100644 index 000000000..e08dc24b5 --- /dev/null +++ b/ui/settings/mainContent.css @@ -0,0 +1,36 @@ +QCheckBox +{ + color: black; +} + +QLabel +{ + color: black; +} + +QGroupBox::title +{ + color: black; + background-color: white; +} + +QWidget +{ + color: black; + background-color: white; +} + +QComboBox +{ + background-color: white; +} + +QComboBox:on QComboBox:off QComboBox:drop-down +{ + background: rgba(18, 18, 18, 204); +} + +QComboBox:active +{ + background: white; +} diff --git a/ui/settings/mainHead.css b/ui/settings/mainHead.css new file mode 100644 index 000000000..3a97d7d35 --- /dev/null +++ b/ui/settings/mainHead.css @@ -0,0 +1,5 @@ +QWidget +{ + color: black; + background: white; +} diff --git a/widget/widget.cpp b/widget/widget.cpp index 53a34449c..dfa25fffe 100644 --- a/widget/widget.cpp +++ b/widget/widget.cpp @@ -74,6 +74,8 @@ Widget::Widget(QWidget *parent) ui->mainHead->setLayout(new QVBoxLayout()); ui->mainHead->layout()->setMargin(0); ui->mainHead->layout()->setSpacing(0); + ui->mainHead->setStyleSheet(Style::getStylesheet(":ui/settings/mainHead.css")); + ui->mainContent->setStyleSheet(Style::getStylesheet(":ui/settings/mainContent.css")); contactListWidget = new FriendListWidget(); ui->friendList->setWidget(contactListWidget);