1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02: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)
{
QPainter painter(this);
painter.fillRect(ev->rect(), palette().background());
painter.fillRect(ev->rect(), palette().window());
QScrollBar::paintEvent(ev);
}

View File

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