Soapy: Refresh button

This commit is contained in:
Alexsey 2020-12-14 19:46:05 +05:00
parent db389372ad
commit 89c579880c

View File

@ -138,7 +138,6 @@ private:
txtSrList = ""; txtSrList = "";
for (double sr : sampleRates) { for (double sr : sampleRates) {
if (sr > 1.0e3 && sr <= 1.0e6) { if (sr > 1.0e3 && sr <= 1.0e6) {
txtSrList += std::to_string((sr / 1.0e3)) + " kHz"; txtSrList += std::to_string((sr / 1.0e3)) + " kHz";
} else if (sr > 1.0e6) { } else if (sr > 1.0e6) {
txtSrList += std::to_string((sr / 1.0e6)) + " MHz"; txtSrList += std::to_string((sr / 1.0e6)) + " MHz";
@ -296,8 +295,9 @@ private:
_this->selectSampleRate(_this->sampleRates[_this->srId]); _this->selectSampleRate(_this->sampleRates[_this->srId]);
_this->saveCurrent(); _this->saveCurrent();
} }
ImGui::SetNextItemWidth(menuWidth);
if (ImGui::Button(CONCAT("Refresh##_dev_select_", _this->name))) { if (ImGui::Button(CONCAT("Refresh##_dev_select_", _this->name),
ImVec2(menuWidth - ImGui::GetCursorPosX(), 0.0))) {
_this->refresh(); _this->refresh();
_this->selectDevice(config.conf["device"]); _this->selectDevice(config.conf["device"]);
} }