From 3819f1718d58571f663b1488831135afdb6b019b Mon Sep 17 00:00:00 2001 From: Lu Zhen Date: Wed, 3 Apr 2024 16:20:32 +0800 Subject: [PATCH] fix: [extension] display issue Log: Change-Id: Iff2a6137d0da5396eb290965d9f7b9e480ddd89a --- src/plugins/core/gui/plugindetailsview.cpp | 2 +- src/plugins/core/gui/pluginitemdelegate.cpp | 2 +- src/plugins/core/gui/pluginlistview.cpp | 2 +- src/plugins/core/gui/pluginlistview.h | 4 ++-- src/plugins/core/gui/pluginstorewidget.cpp | 1 - 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/core/gui/plugindetailsview.cpp b/src/plugins/core/gui/plugindetailsview.cpp index ee91e9de6..cf331f8a3 100644 --- a/src/plugins/core/gui/plugindetailsview.cpp +++ b/src/plugins/core/gui/plugindetailsview.cpp @@ -135,7 +135,7 @@ void DetailsView::showCfgWidget() void DetailsView::setupUi() { auto mainLayout = new QVBoxLayout(this); - mainLayout->setSpacing(0); + mainLayout->setSpacing(2); mainLayout->setMargin(0); DFrame *detailFrame = new DFrame(this); auto detailLayout = new QHBoxLayout(detailFrame); diff --git a/src/plugins/core/gui/pluginitemdelegate.cpp b/src/plugins/core/gui/pluginitemdelegate.cpp index abdece0b6..d100a836a 100644 --- a/src/plugins/core/gui/pluginitemdelegate.cpp +++ b/src/plugins/core/gui/pluginitemdelegate.cpp @@ -12,7 +12,7 @@ #include #include -inline constexpr int kRectRadius = { 0 }; // do not show rounded corners. +inline constexpr int kRectRadius = { 5 }; // do not show rounded corners. inline constexpr int kIconWidth = { 30 }; inline constexpr int kIconHeight = { 30 }; inline constexpr int kIconLeftMargin = { 10 }; diff --git a/src/plugins/core/gui/pluginlistview.cpp b/src/plugins/core/gui/pluginlistview.cpp index b9bf8e20c..6f8aea11f 100644 --- a/src/plugins/core/gui/pluginlistview.cpp +++ b/src/plugins/core/gui/pluginlistview.cpp @@ -16,7 +16,7 @@ DPF_USE_NAMESPACE DWIDGET_USE_NAMESPACE PluginListView::PluginListView(QWidget *parent) - : QListView(parent) + : DListView(parent) , model(new QStandardItemModel(this)) { setEditTriggers(QAbstractItemView::NoEditTriggers); diff --git a/src/plugins/core/gui/pluginlistview.h b/src/plugins/core/gui/pluginlistview.h index ae829ef8e..a0180b3d7 100644 --- a/src/plugins/core/gui/pluginlistview.h +++ b/src/plugins/core/gui/pluginlistview.h @@ -6,10 +6,10 @@ #include "framework/lifecycle/pluginmetaobject.h" -#include +#include class QStandardItemModel; -class PluginListView : public QListView +class PluginListView : public DTK_WIDGET_NAMESPACE::DListView { Q_OBJECT public: diff --git a/src/plugins/core/gui/pluginstorewidget.cpp b/src/plugins/core/gui/pluginstorewidget.cpp index 800a03a64..fd999f56e 100644 --- a/src/plugins/core/gui/pluginstorewidget.cpp +++ b/src/plugins/core/gui/pluginstorewidget.cpp @@ -39,5 +39,4 @@ void PluginStoreWidget::initializeUi() setLayout(vLayout); vLayout->addWidget(inputEdit); vLayout->addWidget(pluginListView); - vLayout->setContentsMargins(0, 5, 0, 5); }