UI wide resize

* save and restore width of UI wide
This commit is contained in:
David Freese 2020-10-03 16:01:08 -05:00
parent 7d86b0f571
commit 3b0406bcd2
2 changed files with 4 additions and 13 deletions

View file

@ -455,7 +455,6 @@ void status::saveLastState()
xcvr_name = selrig->name_;
Fl_Preferences xcvrpref(RigHomeDir.c_str(), "w1hkj.com", PACKAGE_TARNAME);
xcvrpref.set("xcvr_name", xcvr_name.c_str());
// xcvrpref.set("xml_port", xmlport);
int mX = mainwindow->x();
int mY = mainwindow->y();
@ -472,7 +471,7 @@ void status::saveLastState()
if (mX >= 0 && mX >= 0) {
mainX = mX;
mainY = mY;
if (UIsize == touch_ui) { mainW = mW; mainH = mH; }
if (UIsize == touch_ui || UIsize == wide_ui) { mainW = mW; mainH = mH; }
}
Fl_Preferences spref(RigHomeDir.c_str(), "w1hkj.com", xcvr_name.c_str());
@ -959,7 +958,7 @@ bool status::loadXcvrState(string xcvr)
}
current_ui_size = UIsize;
if (UIsize == wide_ui) {
mainW = WIDE_MAINW;
mainW = progStatus.mainW;//WIDE_MAINW;
}
if (UIsize == small_ui) {
mainW = SMALL_MAINW;

View file

@ -1774,8 +1774,6 @@ void updateSelect() {
progStatus.memfontnbr, progStatus.memfontsize, bg_clr,
progStatus.memfontnbr, progStatus.memfontsize, bg_clr, szatag );
FreqSelect->add (szline);
//if (n == 0)
//std::cout << szline << std::endl;
}
inAlphaTag->value("");
}
@ -3331,8 +3329,6 @@ void read_rig_vals()
selrig->selectA(); // second select call
read_vfoA_vals();
}
//std::cout << "xcvr_vfoA.freq " << xcvr_vfoA.freq << std::endl;
//std::cout << "xcvr_vfoB.freq " << xcvr_vfoB.freq << std::endl;
if (selrig->has_agc_control) {
progStatus.agc_level = selrig->get_agc();
redrawAGC();
@ -3868,7 +3864,8 @@ void adjust_xig_wide()
void adjust_wide_ui()
{
mainwindow->resize( mainwindow->x(), mainwindow->y(), mainwindow->w(), WIDE_MAINH);
mainwindow->resize(
progStatus.mainX, progStatus.mainY, progStatus.mainW, progStatus.mainH);
mainwindow->redraw();
btnVol->show();
@ -4011,7 +4008,6 @@ void adjust_touch_ui()
tabs550->hide();
tabsGeneric->remove(genericAux);
if (progStatus.aux_serial_port != "NONE" || selrig->has_data_port) {
//std::cout << "has data port\n";
if (progStatus.aux_serial_port != "NONE") {
btnAuxRTS->activate();
btnAuxDTR->activate();
@ -5590,7 +5586,6 @@ void init_VFOs()
vfoB.freq = progStatus.freq_B;
vfoB.imode = progStatus.imode_B;
vfoB.iBW = progStatus.iBW_B;
//std::cout << "use Status data, vfoB.freq " << vfoB.freq << std::endl;
if (vfoB.iBW == -1)
vfoB.iBW = selrig->def_bandwidth(vfoB.imode);
@ -5621,7 +5616,6 @@ void init_VFOs()
selrig->set_bwA(vfoA.iBW);
selrig->set_vfoA(vfoA.freq);
FreqDispA->value( vfoA.freq );
//std::cout << "use Status data, vfoA.freq " << vfoA.freq << std::endl;
update_progress(progress->value() + 4);
@ -5664,8 +5658,6 @@ void init_VFOs()
} else {
vfoB = xcvr_vfoB;
vfoA = xcvr_vfoA;
//std::cout << "use rig data, vfoA.freq " << vfoA.freq << std::endl;
//std::cout << "use rig data, vfoB.freq " << vfoB.freq << std::endl;
FreqDispB->value(vfoB.freq);
FreqDispA->value(vfoA.freq);
}