diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2020-07-28 07:16:43 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2020-07-28 07:16:43 +0000 |
commit | f30f8ac5b1310edb548e77f76e6e356449516a33 (patch) | |
tree | 66e955f51ddd9e97628f6d5d63011f4c4d8e943e | |
parent | 87ead1f144146da4be77a4aa4248dc2dcaebcdef (diff) | |
download | VirtualBox-svn-f30f8ac5b1310edb548e77f76e6e356449516a33.tar.gz |
FE/Qt: bugref:9686, bugref:9510. Correctiing margins and spacing of the widget
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@85485 cfe28804-0f27-0410-a406-dd0f0b0b656f
-rw-r--r-- | src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.cpp | 12 | ||||
-rw-r--r-- | src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.h | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.cpp b/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.cpp index de3dd4e45ea..86ceba75637 100644 --- a/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.cpp +++ b/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.cpp @@ -742,7 +742,7 @@ UIPerformanceMonitor::UIPerformanceMonitor(EmbedTo enmEmbedding, QWidget *pParen , m_fShowToolbar(fShowToolbar) { prepareMetrics(); - prepareObjects(); + prepareWidgets(); if (fShowToolbar) prepareToolBar(); retranslateUi(); @@ -849,12 +849,18 @@ void UIPerformanceMonitor::retranslateUi() } } -void UIPerformanceMonitor::prepareObjects() +void UIPerformanceMonitor::prepareWidgets() { m_pMainLayout = new QVBoxLayout(this); if (!m_pMainLayout) return; - m_pMainLayout->setSpacing(0); + + m_pMainLayout->setContentsMargins(0, 0, 0, 0); +#ifdef VBOX_WS_MAC + m_pMainLayout->setSpacing(10); +#else + m_pMainLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); +#endif m_pTimer = new QTimer(this); if (m_pTimer) diff --git a/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.h b/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.h index 1b0116ef9c6..2f048d19fe7 100644 --- a/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.h +++ b/src/VBox/Frontends/VirtualBox/src/monitor/performance/UIPerformanceMonitor.h @@ -139,7 +139,7 @@ private slots: private: - void prepareObjects(); + void prepareWidgets(); void prepareMetrics(); void prepareToolBar(); bool guestAdditionsAvailable(int iMinimumMajorVersion); |