D6216: simplify positioning code

David Edmundson noreply at phabricator.kde.org
Thu Jun 15 14:47:06 UTC 2017


davidedmundson added a comment.


  Mostly seems sensible, mine doesn't animate as-is anyway. Just one question.

INLINE COMMENTS

> notificationshelper.cpp:294
>          } else {
> -            int posY = m_plasmoidScreen.bottom() - cumulativeHeight - m_popupsOnScreen[i]->contentItem()->height();
> -
> -            if (m_popupsOnScreen[i]->isVisible() && m_popupsOnScreen[i]->property("initialPositionSet").toBool() == true && m_popupsOnScreen[i]->y() != 0) {
> -                m_popupsOnScreen[i]->setProperty("y", posY);
> -            } else {
> -                m_popupsOnScreen[i]->setY(posY);
> -                m_popupsOnScreen[i]->setProperty("initialPositionSet", true);
> -            }
> +            pos.setY(m_plasmoidScreen.bottom() - cumulativeHeight - m_popupsOnScreen[i]->contentItem()->height());
>          }

I find it odd that we use the contentItem height not the window height which includes the frame margins.

Especially given that whole other patch is about making sure the window is resized to the contentItem.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D6216

To: mart, #plasma
Cc: davidedmundson, plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170615/136cce76/attachment.html>


More information about the Plasma-devel mailing list