diff --git a/resources/res.qrc b/resources/res.qrc index 55962275..a055f39f 100644 --- a/resources/res.qrc +++ b/resources/res.qrc @@ -42,7 +42,6 @@ icons/emoji-categories/flags.png icons/emoji-categories/flags@2x.png - nheko.png @@ -62,13 +61,14 @@ nheko-32.png nheko-16.png - fonts/OpenSans/OpenSans-Regular.ttf fonts/OpenSans/OpenSans-Italic.ttf fonts/OpenSans/OpenSans-Bold.ttf fonts/OpenSans/OpenSans-Semibold.ttf - fonts/EmojiOne/emojione-android.ttf + + styles/system.qss + diff --git a/resources/styles/system.qss b/resources/styles/system.qss new file mode 100644 index 00000000..f357f426 --- /dev/null +++ b/resources/styles/system.qss @@ -0,0 +1,2 @@ +TimelineView { background-color: red; } +TimelineItem { background-color: rgba(255,0,0,255); } diff --git a/src/ChatPage.cc b/src/ChatPage.cc index 147d33c0..42e09df4 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc @@ -55,7 +55,6 @@ ChatPage::ChatPage(QSharedPointer client, QWidget *parent) auto splitter = new Splitter(this); splitter->setHandleWidth(1); - splitter->setStyleSheet("QSplitter::handle { background-color: palette(base); }"); topLayout_->addWidget(splitter); diff --git a/src/MainWindow.cc b/src/MainWindow.cc index 6a2a276c..d2d08a4a 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -43,7 +43,6 @@ MainWindow::MainWindow(QWidget *parent) { setWindowTitle("nheko"); setObjectName("MainWindow"); -// setStyleSheet("QWidget#MainWindow {background-color: #fff}"); restoreWindowSize(); diff --git a/src/TextInputWidget.cc b/src/TextInputWidget.cc index 0383ddd8..36d93b53 100644 --- a/src/TextInputWidget.cc +++ b/src/TextInputWidget.cc @@ -182,7 +182,6 @@ TextInputWidget::TextInputWidget(QWidget *parent) send_file_icon.addFile(":/icons/icons/ui/paper-clip-outline.png"); sendFileBtn_ = new FlatButton(this); - sendFileBtn_->setForegroundColor(palette().color(QPalette::Text)); sendFileBtn_->setIcon(send_file_icon); sendFileBtn_->setIconSize(QSize(24, 24)); @@ -203,7 +202,6 @@ TextInputWidget::TextInputWidget(QWidget *parent) input_->setStyleSheet("border: none; padding-top: 5px; background-color: rgba(0,0,0,0);"); sendMessageBtn_ = new FlatButton(this); - sendMessageBtn_->setForegroundColor(palette().color(QPalette::Text)); QIcon send_message_icon; send_message_icon.addFile(":/icons/icons/ui/cursor.png"); @@ -211,7 +209,6 @@ TextInputWidget::TextInputWidget(QWidget *parent) sendMessageBtn_->setIconSize(QSize(24, 24)); emojiBtn_ = new EmojiPickButton(this); - emojiBtn_->setForegroundColor(palette().color(QPalette::Text)); QIcon emoji_icon; emoji_icon.addFile(":/icons/icons/ui/smile.png"); diff --git a/src/TimelineItem.cc b/src/TimelineItem.cc index 55548524..c7949044 100644 --- a/src/TimelineItem.cc +++ b/src/TimelineItem.cc @@ -67,7 +67,6 @@ TimelineItem::init() headerLayout_->setMargin(0); headerLayout_->setSpacing(conf::timeline::headerSpacing); - setStyleSheet("background-color: rgba(0,0,0,0);"); } /* diff --git a/src/TimelineView.cc b/src/TimelineView.cc index 58a7cb3c..761fe015 100644 --- a/src/TimelineView.cc +++ b/src/TimelineView.cc @@ -399,9 +399,6 @@ TimelineView::init() const int max = scroll_area_->verticalScrollBar()->maximum(); scroll_area_->verticalScrollBar()->setValue(max); }); - - setBackgroundRole(QPalette::Base); - top_layout_ = new QVBoxLayout(this); top_layout_->setSpacing(0); top_layout_->setMargin(0); @@ -418,6 +415,7 @@ TimelineView::init() scroll_layout_ = new QVBoxLayout(scroll_widget_); scroll_layout_->addStretch(1); scroll_layout_->setSpacing(0); + scroll_layout_->setObjectName("timelinescrollarea"); scroll_area_->setWidget(scroll_widget_); diff --git a/src/TopRoomBar.cc b/src/TopRoomBar.cc index ba794126..d852ae32 100644 --- a/src/TopRoomBar.cc +++ b/src/TopRoomBar.cc @@ -70,7 +70,6 @@ TopRoomBar::TopRoomBar(QWidget *parent) textLayout_->addWidget(topicLabel_); settingsBtn_ = new FlatButton(this); - settingsBtn_->setForegroundColor(palette().color(QPalette::ToolTipText)); settingsBtn_->setFixedSize(buttonSize_, buttonSize_); settingsBtn_->setCornerRadius(buttonSize_ / 2); diff --git a/src/UserInfoWidget.cc b/src/UserInfoWidget.cc index 71764e30..aac3e592 100644 --- a/src/UserInfoWidget.cc +++ b/src/UserInfoWidget.cc @@ -77,7 +77,6 @@ UserInfoWidget::UserInfoWidget(QWidget *parent) buttonLayout_->setMargin(0); logoutButton_ = new FlatButton(this); - logoutButton_->setForegroundColor(palette().color(QPalette::Text)); logoutButton_->setCornerRadius(logoutButtonSize_ / 2); QIcon icon; diff --git a/src/main.cc b/src/main.cc index 8bd77254..f800c9ae 100644 --- a/src/main.cc +++ b/src/main.cc @@ -70,6 +70,12 @@ main(int argc, char *argv[]) app.setWindowIcon(QIcon(":/logos/nheko.png")); qSetMessagePattern("%{time process}: [%{type}] - %{message}"); + QFile stylefile(":/styles/styles/system.qss"); + stylefile.open(QFile::ReadOnly); + QString stylesheet = QString(stylefile.readAll()); + + app.setStyleSheet(stylesheet); + QSettings settings; // Set the default if a value has not been set.