1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Port from deprecated QPalette::background() > QPalette::window()

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-12-31 18:52:59 +01:00
parent 03b2880f8b
commit 14719b3ec3
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07
2 changed files with 2 additions and 4 deletions

View File

@ -88,6 +88,6 @@ void WebScrollBar::performScroll()
void WebScrollBar::paintEvent(QPaintEvent *ev) void WebScrollBar::paintEvent(QPaintEvent *ev)
{ {
QPainter painter(this); QPainter painter(this);
painter.fillRect(ev->rect(), palette().background()); painter.fillRect(ev->rect(), palette().window());
QScrollBar::paintEvent(ev); QScrollBar::paintEvent(ev);
} }

View File

@ -58,15 +58,13 @@ public:
private: private:
void paintEvent(QPaintEvent *ev) override void paintEvent(QPaintEvent *ev) override
{ {
Q_UNUSED(ev)
QStyleOption option; QStyleOption option;
option.initFrom(this); option.initFrom(this);
option.rect = rect(); option.rect = rect();
QPainter p(this); QPainter p(this);
if (mApp->styleName() == QL1S("breeze")) { if (mApp->styleName() == QL1S("breeze")) {
p.fillRect(ev->rect(), option.palette.background()); p.fillRect(ev->rect(), option.palette.window());
} else { } else {
style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this); style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this);
} }