diff --git a/frame/item/components/appsnapshot.cpp b/frame/item/components/appsnapshot.cpp index f7011a8b3..f6c58725d 100644 --- a/frame/item/components/appsnapshot.cpp +++ b/frame/item/components/appsnapshot.cpp @@ -74,12 +74,8 @@ AppSnapshot::AppSnapshot(const WId wid, QWidget *parent) QHBoxLayout *centralLayout = new QHBoxLayout; centralLayout->addWidget(m_title); - centralLayout->addWidget(m_closeBtn2D); - centralLayout->setSpacing(5); centralLayout->setMargin(0); - centralLayout->setAlignment(m_closeBtn2D, Qt::AlignRight); - setLayout(centralLayout); setAcceptDrops(true); resize(SNAP_WIDTH, SNAP_HEIGHT); @@ -202,6 +198,7 @@ void AppSnapshot::enterEvent(QEvent *e) QWidget::enterEvent(e); if (!m_wmHelper->hasComposite()) { + m_closeBtn2D->move(width() - m_closeBtn2D->width() - 5, (height() - m_closeBtn2D->height()) / 2); m_closeBtn2D->setVisible(true); } else { emit entered(wid());