From 62ca8f8b29e76a0fedcfd0e6fa1887fdf4856254 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 20 Apr 2022 22:33:28 +0200 Subject: [PATCH] Massive UI revamping (v7): fixed main spectrum window minimum height. Fixes #1210 --- sdrgui/mainspectrum/mainspectrumgui.cpp | 4 +++- sdrgui/mainspectrum/mainspectrumgui.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sdrgui/mainspectrum/mainspectrumgui.cpp b/sdrgui/mainspectrum/mainspectrumgui.cpp index 04aab3795..2567bdc41 100644 --- a/sdrgui/mainspectrum/mainspectrumgui.cpp +++ b/sdrgui/mainspectrum/mainspectrumgui.cpp @@ -42,6 +42,8 @@ MainSpectrumGUI::MainSpectrumGUI(GLSpectrum *spectrum, GLSpectrumGUI *spectrumGU setWindowFlags(windowFlags() | Qt::FramelessWindowHint); m_helpURL = "sdrgui/mainspectrum/readme.md"; + setMinimumSize(m_MinimumWidth, m_MinimumHeight); + m_indexLabel = new QLabel(); m_indexLabel->setFixedSize(32, 16); m_indexLabel->setStyleSheet("QLabel { background-color: rgb(128, 128, 128); qproperty-alignment: AlignCenter; }"); @@ -221,7 +223,7 @@ void MainSpectrumGUI::shrinkWindow() { qDebug("MainSpectrumGUI::shrinkWindow"); adjustSize(); - resize(width(), 360); + resize(width(), m_MinimumHeight); } void MainSpectrumGUI::setTitle(const QString& title) diff --git a/sdrgui/mainspectrum/mainspectrumgui.h b/sdrgui/mainspectrum/mainspectrumgui.h index 29892af29..859e61678 100644 --- a/sdrgui/mainspectrum/mainspectrumgui.h +++ b/sdrgui/mainspectrum/mainspectrumgui.h @@ -86,6 +86,8 @@ private: QSizeGrip *m_sizeGripBottomRight; bool m_drag; QPoint m_DragPosition; + static const int m_MinimumWidth = 360; + static const int m_MinimumHeight = 200 + 20 + 10 + 4*22 + 5; void closeEvent(QCloseEvent *event); void mousePressEvent(QMouseEvent* event);