diff --git a/frame/item/components/appsnapshot.cpp b/frame/item/components/appsnapshot.cpp index 6ce530214..00b045dbd 100644 --- a/frame/item/components/appsnapshot.cpp +++ b/frame/item/components/appsnapshot.cpp @@ -42,9 +42,9 @@ AppSnapshot::AppSnapshot(const WId wid, QWidget *parent) m_wmHelper(DWindowManagerHelper::instance()) { m_closeBtn->setFixedSize(24, 24); - m_closeBtn->setNormalPic(":/icons/resources/close_round_normal.png"); - m_closeBtn->setHoverPic(":/icons/resources/close_round_hover.png"); - m_closeBtn->setPressPic(":/icons/resources/close_round_press.png"); + m_closeBtn->setNormalPic(":/icons/resources/close_round_normal.svg"); + m_closeBtn->setHoverPic(":/icons/resources/close_round_hover.svg"); + m_closeBtn->setPressPic(":/icons/resources/close_round_press.svg"); m_closeBtn->setVisible(false); QHBoxLayout *centralLayout = new QHBoxLayout; @@ -55,7 +55,7 @@ AppSnapshot::AppSnapshot(const WId wid, QWidget *parent) setLayout(centralLayout); setAcceptDrops(true); - setFixedSize(SNAP_WIDTH, SNAP_HEIGHT); + resize(SNAP_WIDTH, SNAP_HEIGHT); connect(m_closeBtn, &DImageButton::clicked, this, &AppSnapshot::closeWindow, Qt::QueuedConnection); connect(m_wmHelper, &DWindowManagerHelper::hasCompositeChanged, this, &AppSnapshot::compositeChanged, Qt::QueuedConnection); diff --git a/frame/item/components/floatingpreview.cpp b/frame/item/components/floatingpreview.cpp index e58063d81..a7888177c 100644 --- a/frame/item/components/floatingpreview.cpp +++ b/frame/item/components/floatingpreview.cpp @@ -76,7 +76,7 @@ void FloatingPreview::paintEvent(QPaintEvent *e) if (m_tracked.isNull()) return; - const QImage snapshot = m_tracked->snapshot(); + const QImage &snapshot = m_tracked->snapshot(); if (snapshot.isNull()) return; diff --git a/frame/item/components/previewcontainer.cpp b/frame/item/components/previewcontainer.cpp index c669ffd25..0cf9201c4 100644 --- a/frame/item/components/previewcontainer.cpp +++ b/frame/item/components/previewcontainer.cpp @@ -79,7 +79,8 @@ void PreviewContainer::setWindowInfos(const WindowDict &infos) if (m_snapshots.isEmpty()) emit requestCancelAndHidePreview(); - adjustSize(); + + adjustSize(); } void PreviewContainer::updateSnapshots()