quick: make sure top border stays on top

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-05-18 18:00:56 +08:00
parent 06653433d7
commit 6731007e35
1 changed files with 1 additions and 0 deletions

View File

@ -158,6 +158,7 @@ void FramelessQuickWindowPrivate::initialize()
QQuickItem * const rootItem = q->contentItem(); QQuickItem * const rootItem = q->contentItem();
FramelessQuickHelper::get(rootItem)->extendsContentIntoTitleBar(); FramelessQuickHelper::get(rootItem)->extendsContentIntoTitleBar();
m_topBorderRectangle.reset(new QQuickRectangle(rootItem)); m_topBorderRectangle.reset(new QQuickRectangle(rootItem));
m_topBorderRectangle->setZ(999); // Make sure the frame border stays on top of eveything.
m_topBorderRectangle->setColor(kDefaultTransparentColor); m_topBorderRectangle->setColor(kDefaultTransparentColor);
m_topBorderRectangle->setHeight(0.0); m_topBorderRectangle->setHeight(0.0);
QQuickPen * const b = m_topBorderRectangle->border(); QQuickPen * const b = m_topBorderRectangle->border();