From 1b97d2f8a5728efa35cbea55b1c3c93d10f08057 Mon Sep 17 00:00:00 2001 From: dreamsourcelabTAI Date: Mon, 8 Apr 2024 19:20:05 +0800 Subject: [PATCH] The content margin of group is tool small on device options dialog --- DSView/pv/dialogs/deviceoptions.cpp | 7 +++++-- DSView/pv/dock/measuredock.cpp | 4 ++++ DSView/pv/dock/searchdock.h | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DSView/pv/dialogs/deviceoptions.cpp b/DSView/pv/dialogs/deviceoptions.cpp index f38ee1aa..f8147a56 100644 --- a/DSView/pv/dialogs/deviceoptions.cpp +++ b/DSView/pv/dialogs/deviceoptions.cpp @@ -137,6 +137,7 @@ DeviceOptions::DeviceOptions(QWidget *parent) : QGroupBox *props_box = new QGroupBox(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_MODE), "Mode"), this); props_box->setFont(font); QLayout *props_lay = get_property_form(props_box); + props_lay->setContentsMargins(5, 15, 5, 5); props_box->setLayout(props_lay); _container_lay->addWidget(props_box); @@ -394,8 +395,8 @@ void DeviceOptions::logic_probes(QVBoxLayout &layout) QPushButton *enable_all_probes = new QPushButton(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_ENABLE_ALL), "Enable All")); QPushButton *disable_all_probes = new QPushButton(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_DISABLE_ALL), "Disable All")); - enable_all_probes->setMaximumHeight(30); - disable_all_probes->setMaximumHeight(30); + enable_all_probes->setMaximumHeight(33); + disable_all_probes->setMaximumHeight(33); enable_all_probes->setFont(font); disable_all_probes->setFont(font); @@ -835,6 +836,8 @@ void DeviceOptions::build_dynamic_panel() box->setVisible(false); } + _dynamic_panel->layout()->setContentsMargins(5, 15, 5, 5); + _isBuilding = false; } diff --git a/DSView/pv/dock/measuredock.cpp b/DSView/pv/dock/measuredock.cpp index e4bac7b4..369a14c1 100644 --- a/DSView/pv/dock/measuredock.cpp +++ b/DSView/pv/dock/measuredock.cpp @@ -88,6 +88,7 @@ MeasureDock::MeasureDock(QWidget *parent, View &view, SigSession *session) : _mouse_layout->addWidget(new QLabel(_widget), 2, 6); _mouse_layout->setColumnStretch(5, 1); _mouse_groupBox->setLayout(_mouse_layout); + _mouse_layout->setContentsMargins(5, 15, 5, 5); /* cursor distance group */ _dist_groupBox = new QGroupBox(_widget); @@ -104,6 +105,7 @@ MeasureDock::MeasureDock(QWidget *parent, View &view, SigSession *session) : _dist_layout->setColumnStretch(1, 50); _dist_layout->setColumnStretch(6, 100); _dist_groupBox->setLayout(_dist_layout); + _dist_layout->setContentsMargins(5, 15, 5, 5); /* cursor edges group */ _edge_groupBox = new QGroupBox(_widget); @@ -120,6 +122,7 @@ MeasureDock::MeasureDock(QWidget *parent, View &view, SigSession *session) : _edge_layout->addWidget(_edge_label, 0, 6); _edge_layout->setColumnStretch(1, 50); _edge_groupBox->setLayout(_edge_layout); + _edge_layout->setContentsMargins(5, 15, 5, 5); /* cursors group */ _time_label = new QLabel(_widget); @@ -130,6 +133,7 @@ MeasureDock::MeasureDock(QWidget *parent, View &view, SigSession *session) : _cursor_layout->setColumnStretch(3, 1); _cursor_groupBox->setLayout(_cursor_layout); + _cursor_layout->setContentsMargins(5, 15, 5, 5); QVBoxLayout *layout = new QVBoxLayout(_widget); layout->addWidget(_mouse_groupBox); diff --git a/DSView/pv/dock/searchdock.h b/DSView/pv/dock/searchdock.h index a88548fd..ff71acf9 100644 --- a/DSView/pv/dock/searchdock.h +++ b/DSView/pv/dock/searchdock.h @@ -30,7 +30,6 @@ #include #include #include -#include #include #include