mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Device GUIs: Constain window size via minimumSize/maximumSize, rather than handling resizeEvent. Add maximum button. Hide size buttons when window size is fixed
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "ui_audioinputgui.h"
|
||||
#include "gui/colormapper.h"
|
||||
@@ -44,7 +43,7 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource = (AudioInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
ui->setupUi(getContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
sizeToContents();
|
||||
getContents()->setStyleSheet("#AudioInputGui { background-color: rgb(64, 64, 64); }");
|
||||
m_helpURL = "plugins/samplesource/audioinput/readme.md";
|
||||
|
||||
@@ -98,12 +97,6 @@ bool AudioInputGui::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void AudioInputGui::resizeEvent(QResizeEvent* size)
|
||||
{
|
||||
adjustSize();
|
||||
size->accept();
|
||||
}
|
||||
|
||||
bool AudioInputGui::handleMessage(const Message& message)
|
||||
{
|
||||
if (AudioInput::MsgConfigureAudioInput::match(message))
|
||||
|
||||
@@ -47,9 +47,6 @@ public:
|
||||
bool deserialize(const QByteArray& data);
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent* size);
|
||||
|
||||
private:
|
||||
Ui::AudioInputGui* ui;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user