mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-03 06:24:48 -04:00
Massive UI revamping (v7): added channels
This commit is contained in:
@@ -132,6 +132,13 @@ FeatureGUI::FeatureGUI(QWidget *parent) :
|
||||
connect(m_shrinkButton, SIGNAL(clicked()), this, SLOT(shrinkWindow()));
|
||||
connect(this, SIGNAL(forceShrink()), this, SLOT(shrinkWindow()));
|
||||
connect(m_closeButton, SIGNAL(clicked()), this, SLOT(close()));
|
||||
|
||||
connect(
|
||||
&m_rollupContents,
|
||||
&RollupContents::widgetRolled,
|
||||
this,
|
||||
&FeatureGUI::onWidgetRolled
|
||||
);
|
||||
}
|
||||
|
||||
FeatureGUI::~FeatureGUI()
|
||||
@@ -215,6 +222,22 @@ void FeatureGUI::openMoveToWorkspaceDialog()
|
||||
}
|
||||
}
|
||||
|
||||
void FeatureGUI::onWidgetRolled(QWidget *widget, bool show)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
// qDebug("FeatureGUI::onWidgetRolled: show: %d %d", m_rollupContents.height(), widget->height());
|
||||
int dh = m_heightsMap.contains(widget) ? m_heightsMap[widget] - widget->height() : widget->minimumHeight();
|
||||
resize(width(), 52 + m_rollupContents.height() + dh);
|
||||
}
|
||||
else
|
||||
{
|
||||
// qDebug("FeatureGUI::onWidgetRolled: hide: %d %d", m_rollupContents.height(), widget->height());
|
||||
m_heightsMap[widget] = widget->height();
|
||||
resize(width(), 52 + m_rollupContents.height());
|
||||
}
|
||||
}
|
||||
|
||||
void FeatureGUI::shrinkWindow()
|
||||
{
|
||||
qDebug("FeatureGUI::shrinkWindow");
|
||||
|
||||
Reference in New Issue
Block a user