correctly enable/disable shadow
This commit is contained in:
parent
c7d16008d7
commit
a135c4de7d
@ -155,7 +155,7 @@ void DialogPrivate::syncBorders()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (q->isVisible()) {
|
if (q->isVisible() && backgroundHints != Dialog::NoBackground) {
|
||||||
DialogShadows::self()->addWindow(q, frameSvgItem->enabledBorders());
|
DialogShadows::self()->addWindow(q, frameSvgItem->enabledBorders());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -167,6 +167,7 @@ void DialogPrivate::updateTheme()
|
|||||||
KWindowEffects::enableBlurBehind(q->winId(), false);
|
KWindowEffects::enableBlurBehind(q->winId(), false);
|
||||||
KWindowEffects::enableBackgroundContrast(q->winId(), false);
|
KWindowEffects::enableBackgroundContrast(q->winId(), false);
|
||||||
q->setMask(QRegion());
|
q->setMask(QRegion());
|
||||||
|
DialogShadows::self()->removeWindow(q);
|
||||||
} else {
|
} else {
|
||||||
if (type == Dialog::Tooltip) {
|
if (type == Dialog::Tooltip) {
|
||||||
frameSvgItem->setImagePath("widgets/tooltip");
|
frameSvgItem->setImagePath("widgets/tooltip");
|
||||||
@ -187,6 +188,9 @@ void DialogPrivate::updateTheme()
|
|||||||
} else {
|
} else {
|
||||||
q->setMask(frameSvgItem->frameSvg()->mask());
|
q->setMask(frameSvgItem->frameSvg()->mask());
|
||||||
}
|
}
|
||||||
|
if (q->isVisible()) {
|
||||||
|
DialogShadows::self()->addWindow(q, frameSvgItem->enabledBorders());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
updateInputShape();
|
updateInputShape();
|
||||||
}
|
}
|
||||||
@ -845,7 +849,9 @@ void Dialog::focusOutEvent(QFocusEvent *ev)
|
|||||||
|
|
||||||
void Dialog::showEvent(QShowEvent *event)
|
void Dialog::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
DialogShadows::self()->addWindow(this, d->frameSvgItem->enabledBorders());
|
if (d->backgroundHints != Dialog::NoBackground) {
|
||||||
|
DialogShadows::self()->addWindow(this, d->frameSvgItem->enabledBorders());
|
||||||
|
}
|
||||||
QQuickWindow::showEvent(event);
|
QQuickWindow::showEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user