Fixed UI bug in radio

This commit is contained in:
Ryzerth 2020-12-06 20:02:22 +01:00
parent fe1de4bed9
commit e5123dd8bf
10 changed files with 13 additions and 13 deletions

View File

@ -123,7 +123,6 @@ void windowInit() {
// TODO for 0.2.5
// Add "select folder" option for the file source
// Fix SSB demod
// FIX AUDIO ISSUE ON BOTH LINUX AND SOMETIMES WINDOWS (probly the ring buffer, though double buffering could help)
// Add default main config to avoid having to ship one
// Have a good directory system on both linux and windows

View File

@ -101,9 +101,9 @@ public:
setBandwidth(bw);
}
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("Snap Interval").x - 8);
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_am_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, 0)) {
setSnapInterval(snapInterval);
}

View File

@ -111,9 +111,9 @@ public:
setBandwidth(bw);
}
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("Snap Interval").x - 8);
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_cw_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, 0)) {
setSnapInterval(snapInterval);
}

View File

@ -101,9 +101,9 @@ public:
setBandwidth(bw);
}
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("Snap Interval").x - 8);
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_dsb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, 0)) {
setSnapInterval(snapInterval);
}

View File

@ -97,9 +97,9 @@ public:
setBandwidth(bw);
}
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("Snap Interval").x - 8);
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_fm_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, 0)) {
setSnapInterval(snapInterval);
}

View File

@ -101,9 +101,9 @@ public:
setBandwidth(bw);
}
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("Snap Interval").x - 8);
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_lsb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, 0)) {
setSnapInterval(snapInterval);
}

View File

@ -70,9 +70,9 @@ public:
void showMenu() {
float menuWidth = ImGui::GetContentRegionAvailWidth();
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("Snap Interval").x - 8);
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_raw_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, 0)) {
setSnapInterval(snapInterval);
}

View File

@ -101,9 +101,9 @@ public:
setBandwidth(bw);
}
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("Snap Interval").x - 8);
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_usb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, 0)) {
setSnapInterval(snapInterval);
}

View File

@ -104,16 +104,17 @@ public:
setBandwidth(bw);
}
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("Snap Interval").x - 8);
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_wfm_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, 0)) {
setSnapInterval(snapInterval);
}
ImGui::SetNextItemWidth(menuWidth - ImGui::CalcTextSize("De-emphasis").x - 8);
ImGui::Text("De-emphasis");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo(("##_radio_wfm_deemp_" + uiPrefix).c_str(), &deempId, deempModes)) {
setDeempIndex(deempId);
}

View File

@ -19,7 +19,7 @@
"bandPlan": "General",
"bandPlanEnabled": true,
"fftHeight": 296,
"frequency": 95000000,
"frequency": 99000000,
"max": 0.0,
"maximized": false,
"menuOrder": [
@ -42,7 +42,7 @@
"Radio": {
"muted": false,
"sink": "Audio",
"volume": 0.831632673740387
"volume": 0.6887755393981934
},
"Radio 1": {
"muted": true,