1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

dd maximize button to MainSpectrum and expandible Channels and Features.

Add sizeToContents in ChannelGUI and FeatureGUI, called when widget is
rolled, so we can remove resizing code from all of the individual
channels and features.

In RollupContents, use minimumSizeHint for calculated size, so that
minimumWidth can come from .ui file.

In DeviceGUI::sizeToContents(), call adjustSize(), so Device GUIs start
out at minimum needed size (which should restore appearance prior to
last patch).

In stackSubWindows, use available space for channels if no
spectrum/features present.
In stackSubWindows, fix spectrum from being sized too big, resulting in
scroll bars appearing.
Reset user-defined channel width in stackSubWindows, when channels are
removed.
Don't stack maximized windows.

There's one hack in Channel/FeatureGUI::maximizeWindow(). It seems that
when maximimzing a window, QOpenGLWidgets aren't always paint properly
immediately afterwards, so the code forces an additional update. I can't
see why the first call to paintGL doesn't work.
This commit is contained in:
Jon Beniston
2022-11-11 12:24:27 +00:00
parent b6e13d1e6c
commit c966f1cb5a
108 changed files with 340 additions and 828 deletions
@@ -17,7 +17,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QMessageBox>
#include <QResizeEvent>
#include "feature/featureuiset.h"
#include "gui/basicfeaturesettingsdialog.h"
@@ -68,14 +67,6 @@ bool RigCtlServerGUI::deserialize(const QByteArray& data)
}
}
void RigCtlServerGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool RigCtlServerGUI::handleMessage(const Message& message)
{
if (RigCtlServer::MsgConfigureRigCtlServer::match(message))
@@ -139,7 +130,6 @@ RigCtlServerGUI::RigCtlServerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
m_helpURL = "plugins/feature/rigctlserver/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));