UI Cleanup + Fixed waterfall zoom bug

This commit is contained in:
Ryzerth
2021-08-31 18:39:48 +02:00
parent ec6a258958
commit 22acf33c01
31 changed files with 163 additions and 214 deletions

View File

@ -137,8 +137,7 @@ public:
_config->release(true);
}
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::LeftLabel("Snap Interval");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_am_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
@ -148,8 +147,7 @@ public:
_config->release(true);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::LeftLabel("Squelch");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_am_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);

View File

@ -141,8 +141,7 @@ public:
_config->release(true);
}
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::LeftLabel("Snap Interval");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_cw_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
@ -152,8 +151,7 @@ public:
_config->release(true);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::LeftLabel("Squelch");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_cw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);

View File

@ -137,8 +137,7 @@ public:
_config->release(true);
}
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::LeftLabel("Snap Interval");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_dsb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
@ -148,8 +147,7 @@ public:
_config->release(true);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::LeftLabel("Squelch");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_dsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);

View File

@ -129,8 +129,7 @@ public:
_config->release(true);
}
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::LeftLabel("Snap Interval");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_fm_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
@ -140,8 +139,7 @@ public:
_config->release(true);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::LeftLabel("Squelch");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_fm_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);

View File

@ -137,8 +137,7 @@ public:
_config->release(true);
}
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::LeftLabel("Snap Interval");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_lsb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
@ -148,8 +147,7 @@ public:
_config->release(true);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::LeftLabel("Squelch");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_lsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);

View File

@ -90,8 +90,7 @@ public:
void showMenu() {
float menuWidth = ImGui::GetContentRegionAvailWidth();
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::LeftLabel("Snap Interval");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_raw_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
@ -101,8 +100,7 @@ public:
_config->release(true);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::LeftLabel("Squelch");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_raw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);

View File

@ -137,8 +137,7 @@ public:
_config->release(true);
}
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::LeftLabel("Snap Interval");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_usb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
@ -148,8 +147,7 @@ public:
_config->release(true);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::LeftLabel("Squelch");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_usb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);

View File

@ -164,8 +164,7 @@ public:
_config->release(true);
}
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::LeftLabel("Snap Interval");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_wfm_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
@ -176,8 +175,7 @@ public:
}
ImGui::Text("De-emphasis");
ImGui::SameLine();
ImGui::LeftLabel("De-emphasis");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo(("##_radio_wfm_deemp_" + uiPrefix).c_str(), &deempId, deempModes)) {
setDeempIndex(deempId);
@ -186,8 +184,7 @@ public:
_config->release(true);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::LeftLabel("Squelch");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_wfm_sqelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);