Fixed UI bug

This commit is contained in:
Ryzerth 2021-02-06 21:52:58 +01:00
parent a3f147a827
commit c26855d07e
8 changed files with 8 additions and 8 deletions

View File

@ -139,7 +139,7 @@ public:
ImGui::Text("Squelch"); ImGui::Text("Squelch");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_am_deemp_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { if (ImGui::SliderFloat(("##_radio_am_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel); squelch.setLevel(squelchLevel);
_config->aquire(); _config->aquire();
_config->conf[uiPrefix]["AM"]["squelchLevel"] = squelchLevel; _config->conf[uiPrefix]["AM"]["squelchLevel"] = squelchLevel;

View File

@ -147,7 +147,7 @@ public:
ImGui::Text("Squelch"); ImGui::Text("Squelch");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_cw_deemp_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { if (ImGui::SliderFloat(("##_radio_cw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel); squelch.setLevel(squelchLevel);
_config->aquire(); _config->aquire();
_config->conf[uiPrefix]["CW"]["squelchLevel"] = squelchLevel; _config->conf[uiPrefix]["CW"]["squelchLevel"] = squelchLevel;

View File

@ -139,7 +139,7 @@ public:
ImGui::Text("Squelch"); ImGui::Text("Squelch");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_dsb_deemp_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { if (ImGui::SliderFloat(("##_radio_dsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel); squelch.setLevel(squelchLevel);
_config->aquire(); _config->aquire();
_config->conf[uiPrefix]["DSB"]["squelchLevel"] = squelchLevel; _config->conf[uiPrefix]["DSB"]["squelchLevel"] = squelchLevel;

View File

@ -135,7 +135,7 @@ public:
ImGui::Text("Squelch"); ImGui::Text("Squelch");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_fm_deemp_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { if (ImGui::SliderFloat(("##_radio_fm_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel); squelch.setLevel(squelchLevel);
_config->aquire(); _config->aquire();
_config->conf[uiPrefix]["FM"]["squelchLevel"] = squelchLevel; _config->conf[uiPrefix]["FM"]["squelchLevel"] = squelchLevel;

View File

@ -139,7 +139,7 @@ public:
ImGui::Text("Squelch"); ImGui::Text("Squelch");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_lsb_deemp_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { if (ImGui::SliderFloat(("##_radio_lsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel); squelch.setLevel(squelchLevel);
_config->aquire(); _config->aquire();
_config->conf[uiPrefix]["LSB"]["squelchLevel"] = squelchLevel; _config->conf[uiPrefix]["LSB"]["squelchLevel"] = squelchLevel;

View File

@ -102,7 +102,7 @@ public:
ImGui::Text("Squelch"); ImGui::Text("Squelch");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_raw_deemp_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { if (ImGui::SliderFloat(("##_radio_raw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel); squelch.setLevel(squelchLevel);
_config->aquire(); _config->aquire();
_config->conf[uiPrefix]["RAW"]["squelchLevel"] = squelchLevel; _config->conf[uiPrefix]["RAW"]["squelchLevel"] = squelchLevel;

View File

@ -139,7 +139,7 @@ public:
ImGui::Text("Squelch"); ImGui::Text("Squelch");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_usb_deemp_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { if (ImGui::SliderFloat(("##_radio_usb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel); squelch.setLevel(squelchLevel);
_config->aquire(); _config->aquire();
_config->conf[uiPrefix]["USB"]["squelchLevel"] = squelchLevel; _config->conf[uiPrefix]["USB"]["squelchLevel"] = squelchLevel;

View File

@ -159,7 +159,7 @@ public:
ImGui::Text("Squelch"); ImGui::Text("Squelch");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_wfm_deemp_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) { if (ImGui::SliderFloat(("##_radio_wfm_sqelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel); squelch.setLevel(squelchLevel);
_config->aquire(); _config->aquire();
_config->conf[uiPrefix]["WFM"]["squelchLevel"] = squelchLevel; _config->conf[uiPrefix]["WFM"]["squelchLevel"] = squelchLevel;