diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 4c70b5f26..60d1b4d92 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -576,7 +576,7 @@ void FurnaceGUI::drawSettings() { float vol=fabs(sysVol); ImGui::PushID(i); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::CalcTextSize("Invert").x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::CalcTextSize("Invert").x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x*2.0); if (ImGui::BeginCombo("##System",getSystemName(sysID))) { for (int j=0; availableSystems[j]; j++) { if (ImGui::Selectable(getSystemName((DivSystem)availableSystems[j]),sysID==availableSystems[j])) { @@ -595,11 +595,13 @@ void FurnaceGUI::drawSettings() { } ImGui::SameLine(); //ImGui::BeginDisabled(settings.initialSys.size()<=4); + pushDestColor(); if (ImGui::Button(ICON_FA_MINUS "##InitSysRemove")) { doRemove=i; } + popDestColor(); //ImGui::EndDisabled(); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x*2.0); if (CWSliderFloat("Volume",&vol,0.0f,3.0f)) { if (doInvert) { if (vol<0.0001) vol=0.0001; @@ -609,13 +611,13 @@ void FurnaceGUI::drawSettings() { sysVol=doInvert?-vol:vol; settings.initialSys.set(fmt::sprintf("vol%d",i),(float)sysVol); } rightClickable - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x*2.0); if (CWSliderFloat("Panning",&sysPan,-1.0f,1.0f)) { if (sysPan<-1.0f) sysPan=-1.0f; if (sysPan>1.0f) sysPan=1.0f; settings.initialSys.set(fmt::sprintf("pan%d",i),(float)sysPan); } rightClickable - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x*2.0); if (CWSliderFloat("Front/Rear",&sysPanFR,-1.0f,1.0f)) { if (sysPanFR<-1.0f) sysPanFR=-1.0f; if (sysPanFR>1.0f) sysPanFR=1.0f;