From 3c9d4a1db209a24672f108cae88f1955ebf7bae9 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 4 Mar 2016 12:15:43 +0100 Subject: [PATCH] Fix length returned from PanelView::geometryByDistance PanelView::length() is not actual length. Differential Revision: https://phabricator.kde.org/D1069 --- shell/panelview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/panelview.cpp b/shell/panelview.cpp index c8c3c714c..4ece9aaf4 100644 --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -464,7 +464,7 @@ QRect PanelView::geometryByDistance(int distance) const position = QPoint(s->geometry().bottomLeft() - QPoint(0, thickness() + distance) + QPoint(m_offset, 1)); } } - QRect ret = formFactor() == Plasma::Types::Vertical ? QRect(position, QSize(thickness(), length())) : QRect(position, QSize(length(), thickness())); + QRect ret = formFactor() == Plasma::Types::Vertical ? QRect(position, QSize(thickness(), height())) : QRect(position, QSize(width(), thickness())); ret = ret.intersected(s->geometry()); return ret; }