[escher] Get a View's frame.

Change-Id: I9fbcf2fb8db5f735df5c852762dc8645c0358683
This commit is contained in:
Léa Saviot
2017-12-14 13:38:07 +01:00
parent 62c8db9799
commit 53e7f6ea44
2 changed files with 5 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ public:
KDPoint pointFromPointInView(View * view, KDPoint point);
KDRect bounds() const;
KDRect frame() const;
View * subview(int index);
virtual KDSize minimalSizeForOptimalDisplay() const;

View File

@@ -158,6 +158,10 @@ KDRect View::bounds() const {
return m_frame.movedTo(KDPointZero);
}
KDRect View::frame() const {
return KDRect(m_frame);
}
KDPoint View::absoluteOrigin() const {
if (m_superview == nullptr) {
assert(this == (View *)window());