Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 1cfe69b8 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[PanelShadows] Use 0 offset for disabled borders on Wayland

Summary:
On Wayland, if some border is disabled, we don't attach corresponding
empty tile. Yet, we set offset of 1 for that border.

KWin relies on offset values to calculate bounding box for shadows.

For example, if a panel has only top border enabled, then the bounding
box will be 2 pixel wider(and 1px taller) than it should be. This can
result in having 1px thin artefacts on neighboring screens.

In general, we don't have to attach empty tiles for disabled borders.
Thus, we can set corresponding offsets to 0.

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14999
parent 8cf6f8e3
......@@ -598,7 +598,7 @@ void PanelShadows::Private::updateShadowWayland(const QWindow *window, Plasma::F
}
QSize marginHint;
QMarginsF margins = QMarginsF(1, 1, 1, 1);
QMarginsF margins;
if (enabledBorders & Plasma::FrameSvg::TopBorder) {
marginHint = q->elementSize(QStringLiteral("shadow-hint-top-margin"));
if (marginHint.isValid()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment