mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Massive UI revamping (v7): make correction to sub windows sizes and placement at the top when loading a configuration
This commit is contained in:
@@ -25,6 +25,10 @@
|
||||
#include <QFrame>
|
||||
|
||||
#include "gui/samplingdevicedialog.h"
|
||||
#include "device/devicegui.h"
|
||||
#include "channel/channelgui.h"
|
||||
#include "mainspectrum/mainspectrumgui.h"
|
||||
#include "feature/featuregui.h"
|
||||
#include "workspace.h"
|
||||
|
||||
Workspace::Workspace(int index, QWidget *parent, Qt::WindowFlags flags) :
|
||||
@@ -313,3 +317,23 @@ void Workspace::restoreMdiGeometry(const QByteArray& blob)
|
||||
{
|
||||
m_mdi->restoreGeometry(qUncompress(blob));
|
||||
}
|
||||
|
||||
void Workspace::adjustSubWindowsAfterRestore()
|
||||
{
|
||||
QList<QMdiSubWindow *> subWindowList = m_mdi->subWindowList();
|
||||
|
||||
for (auto& subWindow : subWindowList)
|
||||
{
|
||||
if ((subWindow->y() >= 20) && (subWindow->y() < 40)) {
|
||||
subWindow->move(subWindow->x(), subWindow->y() - 20);
|
||||
}
|
||||
|
||||
if (qobject_cast<ChannelGUI*>(subWindow)) {
|
||||
subWindow->resize(subWindow->width(), subWindow->height() - 22);
|
||||
}
|
||||
|
||||
if (qobject_cast<FeatureGUI*>(subWindow)) {
|
||||
subWindow->resize(subWindow->width(), subWindow->height() - 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user