mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-02 14:04:46 -04:00
Massive UI revamping (v7): Fixed sizing of channel windows. Part of #1209
This commit is contained in:
@@ -106,11 +106,13 @@ InterferometerGUI::InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
|
||||
m_centerFrequency(435000000),
|
||||
m_tickCount(0)
|
||||
{
|
||||
ui->setupUi(getRollupContents());
|
||||
getRollupContents()->arrangeRollups();
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
m_helpURL = "plugins/channelmimo/interferometer/readme.md";
|
||||
RollupContents *rollupContents = getRollupContents();
|
||||
ui->setupUi(rollupContents);
|
||||
setSizePolicy(rollupContents->sizePolicy());
|
||||
rollupContents->arrangeRollups();
|
||||
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_interferometer = (Interferometer*) channelMIMO;
|
||||
@@ -248,7 +250,18 @@ void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||
(void) widget;
|
||||
(void) rollDown;
|
||||
|
||||
getRollupContents()->saveState(m_rollupState);
|
||||
RollupContents *rollupContents = getRollupContents();
|
||||
|
||||
if (rollupContents->hasExpandableWidgets()) {
|
||||
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
|
||||
} else {
|
||||
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
|
||||
}
|
||||
|
||||
int h = rollupContents->height() + getAdditionalHeight();
|
||||
resize(width(), h);
|
||||
|
||||
rollupContents->saveState(m_rollupState);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user