mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix themeing issues on mentions
This commit is contained in:
parent
89015b9f18
commit
98d4f14bd1
5 changed files with 47 additions and 1 deletions
|
@ -24,6 +24,17 @@ TimelineView > * {
|
|||
border: none;
|
||||
}
|
||||
|
||||
UserMentionsWidget,
|
||||
UserMentionsWidget > * {
|
||||
background-color: #202228;
|
||||
border: none;
|
||||
}
|
||||
|
||||
UserMentionsWidget > TimelineItem {
|
||||
qproperty-backgroundColor: #202228;
|
||||
qproperty-hoverColor: rgba(45, 49, 57, 120);
|
||||
}
|
||||
|
||||
#scroll_widget {
|
||||
background-color: #202228;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,17 @@ TimelineView > * {
|
|||
border: none;
|
||||
}
|
||||
|
||||
UserMentionsWidget,
|
||||
UserMentionsWidget > * {
|
||||
background-color: white;
|
||||
border: none;
|
||||
}
|
||||
|
||||
UserMentionsWidget > TimelineItem {
|
||||
qproperty-backgroundColor: white;
|
||||
qproperty-hoverColor: rgba(192, 193, 195, 120);
|
||||
}
|
||||
|
||||
#scroll_widget {
|
||||
background-color: white;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,16 @@ TimelineView > * {
|
|||
border: none;
|
||||
}
|
||||
|
||||
UserMentionsWidget,
|
||||
UserMentionsWidget > * {
|
||||
border: none;
|
||||
}
|
||||
|
||||
UserMentionsWidget > TimelineItem {
|
||||
qproperty-backgroundColor: palette(window);
|
||||
qproperty-hoverColor: palette(base);
|
||||
}
|
||||
|
||||
TextInputWidget {
|
||||
border: none;
|
||||
border-top: 1px solid palette(mid);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include <QPainter>
|
||||
#include <QStyleOption>
|
||||
#include <QTabWidget>
|
||||
#include <QTimer>
|
||||
|
||||
|
@ -140,7 +142,6 @@ UserMentions::pushItem(const QString &event_id,
|
|||
local_scroll_widget_);
|
||||
local_view_item->setEventId(event_id);
|
||||
local_view_item->hide();
|
||||
|
||||
local_scroll_layout_->addWidget(local_view_item);
|
||||
|
||||
QTimer::singleShot(0, this, [local_view_item]() {
|
||||
|
@ -149,3 +150,12 @@ UserMentions::pushItem(const QString &event_id,
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
UserMentions::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
|
@ -5,6 +5,7 @@
|
|||
#include <QApplication>
|
||||
#include <QEvent>
|
||||
#include <QMap>
|
||||
#include <QPaintEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QScrollBar>
|
||||
#include <QString>
|
||||
|
@ -26,6 +27,9 @@ public:
|
|||
void initializeMentions(const QMap<QString, mtx::responses::Notifications> ¬ifs);
|
||||
void showPopup();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
|
||||
private:
|
||||
void pushItem(const QString &event_id,
|
||||
const QString &user_id,
|
||||
|
|
Loading…
Reference in a new issue