Fixed minimum size for waterfall controls
This commit is contained in:
parent
1f3168b115
commit
18e1235a2e
@ -519,11 +519,13 @@ void WideGraph::setDialFreq(double d) //setDialFreq
|
||||
|
||||
void WideGraph::setControlsVisible(bool visible)
|
||||
{
|
||||
ui->cbControls->setChecked(!visible);
|
||||
ui->cbControls->setChecked(visible);
|
||||
}
|
||||
|
||||
bool WideGraph::controlsVisible(){
|
||||
return ui->cbControls->isChecked();
|
||||
auto sizes = ui->splitter->sizes();
|
||||
return ui->cbControls->isChecked() && sizes.last() > 0;
|
||||
}
|
||||
|
||||
void WideGraph::setRxBand (QString const& band)
|
||||
@ -588,6 +590,15 @@ void WideGraph::on_cbRef_toggled(bool b)
|
||||
void WideGraph::on_cbControls_toggled(bool b)
|
||||
{
|
||||
ui->controls_widget->setVisible(b);
|
||||
|
||||
static int lastSize = ui->splitter->width()/4;
|
||||
auto sizes = ui->splitter->sizes();
|
||||
if(b){
|
||||
ui->splitter->setSizes({ sizes.first(), lastSize });
|
||||
} else {
|
||||
// keep track of the last size of the control
|
||||
lastSize = qMax(sizes.last(), 100);
|
||||
}
|
||||
}
|
||||
|
||||
void WideGraph::on_adjust_palette_push_button_clicked (bool) //Adjust Palette
|
||||
|
@ -43,6 +43,12 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="handleWidth">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="childrenCollapsible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="CPlotter" name="widePlot">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
|
Loading…
Reference in New Issue
Block a user