Skip to content

Commit

Permalink
fix: Display issue with preview view
Browse files Browse the repository at this point in the history
Adjust the display margin and modify the border drawing of tags

Log: Display issue with preview view
Bug: https://pms.uniontech.com/bug-view-245707.html
  • Loading branch information
liyigang1 committed Mar 28, 2024
1 parent 62ea32f commit 0d72555
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ TagWidgetPrivate::~TagWidgetPrivate()

void TagWidgetPrivate::initializeUI()
{
q->setFrameShape(QFrame::NoFrame);
mainLayout = new QVBoxLayout(q);
q->setLayout(mainLayout);
QString name = tr("Tag");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ void DetailSpaceWidget::initializeUi()
QHBoxLayout *rvLayout = new QHBoxLayout(this);
rvLayout->setMargin(0);
detailView = new DetailView(this);
DFrame *rightDetailVLine = new DFrame(this);
rightDetailVLine->setFrameShape(QFrame::VLine);
rvLayout->addWidget(rightDetailVLine);
rvLayout->addWidget(detailView, 1);
rvLayout->addWidget(detailView);
setLayout(rvLayout);
}

void DetailSpaceWidget::initConnect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void DetailView::createHeadUI(const QUrl &url, int widgetFilter)

iconLabel = new DLabel(this);
iconLabel->setFixedSize(240, 240);
QSize targetSize(240, 160);
QSize targetSize(240, 240);
auto findPluginIcon = [](const QUrl &url) -> QString {
QString iconName;
bool ok = dpfHookSequence->run(kCurrentEventSpace, "hook_Icon_Fetch", url, &iconName);
Expand Down Expand Up @@ -170,7 +170,7 @@ void DetailView::createHeadUI(const QUrl &url, int widgetFilter)
px.setDevicePixelRatio(qApp->devicePixelRatio());
iconLabel->setPixmap(px);
iconLabel->setAlignment(Qt::AlignCenter);
iconLabel->setContentsMargins(0, 0, 0, 15);
iconLabel->setContentsMargins(-15, 0, 0, 15);
vLayout->insertWidget(0, iconLabel, 0, Qt::AlignHCenter);
}
}
Expand Down

0 comments on commit 0d72555

Please sign in to comment.