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:
parent
03b2880f8b
commit
14719b3ec3
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user