1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

Massive UI revamping (v7): Fixed sizing of feature windows. Part of #1209

This commit is contained in:
f4exb
2022-04-24 19:34:48 +02:00
parent 360b8a9753
commit f77e38eb3f
25 changed files with 294 additions and 142 deletions
@@ -1174,7 +1174,18 @@ void VORLocalizerGUI::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();
}
@@ -1224,9 +1235,13 @@ VORLocalizerGUI::VORLocalizerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
m_lastFeatureState(0),
m_rrSecondsCount(0)
{
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/feature/vorlocalizer/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
ui->map->rootContext()->setContextProperty("vorModel", &m_vorModel);
ui->map->setSource(QUrl(QStringLiteral("qrc:/demodvor/map/map.qml")));
@@ -1234,8 +1249,6 @@ VORLocalizerGUI::VORLocalizerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
m_muteIcon.addPixmap(QPixmap("://sound_off.png"), QIcon::Normal, QIcon::On);
m_muteIcon.addPixmap(QPixmap("://sound_on.png"), QIcon::Normal, QIcon::Off);
setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &VORLocalizerGUI::downloadFinished);