summary refs log tree commit diff
path: root/src/EmojiPanel.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-11-22 19:09:19 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-11-22 19:09:19 +0200
commit929b2df6fb28a1e431027afb032f5eeefd0106b7 (patch)
tree1382bcf577b1ea9ef7e1fb7b812a4f28f30bb9bf /src/EmojiPanel.cc
parentKeep track of newly joined rooms in the settings manager (diff)
parentUse system color scheme (using a Qt stylesheet) #104 (diff)
downloadnheko-929b2df6fb28a1e431027afb032f5eeefd0106b7.tar.xz
Merge branch 'theme'
Diffstat (limited to 'src/EmojiPanel.cc')
-rw-r--r--src/EmojiPanel.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/EmojiPanel.cc b/src/EmojiPanel.cc

index 3f5f8369..82eb8afc 100644 --- a/src/EmojiPanel.cc +++ b/src/EmojiPanel.cc
@@ -32,11 +32,9 @@ EmojiPanel::EmojiPanel(QWidget *parent) , animationDuration_{100} , categoryIconSize_{20} { - setStyleSheet("QWidget {background: #fff; color: #e8e8e8; border: none;}" - "QScrollBar:vertical { background-color: #fff; width: 8px; margin: 0px " - "2px 0 2px; }" - "QScrollBar::handle:vertical { background-color: #d6dde3; min-height: " - "20px; }" + setStyleSheet("QWidget {border: none;}" + "QScrollBar:vertical { width: 8px; margin: 0px 2px 0 2px; }" + "QScrollBar::handle:vertical { min-height: 20px; }" "QScrollBar::add-line:vertical { border: none; background: none; }" "QScrollBar::sub-line:vertical { border: none; background: none; }"); @@ -55,7 +53,7 @@ EmojiPanel::EmojiPanel(QWidget *parent) contentLayout->setMargin(0); auto emojiCategories = new QFrame(mainWidget); - emojiCategories->setStyleSheet("background-color: #f2f2f2"); + // emojiCategories->setStyleSheet("background-color: #f2f2f2"); auto categoriesLayout = new QHBoxLayout(emojiCategories); categoriesLayout->setSpacing(6); @@ -250,6 +248,10 @@ EmojiPanel::leaveEvent(QEvent *event) void EmojiPanel::paintEvent(QPaintEvent *event) { + Q_UNUSED(event); + + QStyleOption opt; + opt.init(this); QPainter p(this); DropShadow::draw(p, shadowMargin_, @@ -262,7 +264,8 @@ EmojiPanel::paintEvent(QPaintEvent *event) width(), height()); - QWidget::paintEvent(event); + style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); + // QWidget::paintEvent(event); } void