diff --git a/dpf-widgets b/dpf-widgets index 484141e..7f5969d 160000 --- a/dpf-widgets +++ b/dpf-widgets @@ -1 +1 @@ -Subproject commit 484141e2a032c8a913dcc3e320b73a2d84a8b338 +Subproject commit 7f5969da6597e1cd8f5e469df74d6b97b39114d7 diff --git a/plugins/Common/IldaeilUI.cpp b/plugins/Common/IldaeilUI.cpp index e1896e6..4eb2c0a 100644 --- a/plugins/Common/IldaeilUI.cpp +++ b/plugins/Common/IldaeilUI.cpp @@ -97,14 +97,15 @@ class IldaeilUI : public UI, char* name; char* format; uint32_t rindex; - bool boolean, bvalue; - float min, max; + bool boolean, bvalue, log; + float min, max, power; Parameter() : name(nullptr), format(nullptr), rindex(0), boolean(false), bvalue(false), + log(false), min(0.0f), max(1.0f) {} ~Parameter() @@ -170,7 +171,10 @@ public: std::strcpy(fPluginSearchString, "Search..."); - const double padding = ImGui::GetStyle().WindowPadding.y * 2; + ImGuiStyle& style(ImGui::GetStyle()); + style.FrameRounding = 4; + + const double padding = style.WindowPadding.y * 2; const double scaleFactor = getScaleFactor(); if (d_isNotEqual(scaleFactor, 1.0)) @@ -343,6 +347,7 @@ public: param.format = format.getAndReleaseBuffer(); param.rindex = i; param.boolean = pdata->hints & PARAMETER_IS_BOOLEAN; + param.log = pdata->hints & PARAMETER_IS_LOGARITHMIC; param.min = pranges->min; param.max = pranges->max; ui->values[j] = carla_get_current_parameter_value(handle, 0, i); @@ -605,6 +610,8 @@ protected: PluginGenericUI* const ui = fPluginGenericUI; DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); + ImGui::SetNextWindowFocus(); + if (ImGui::Begin(ui->title, nullptr, ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoCollapse)) { const CarlaHostHandle handle = fPlugin->fCarlaHostHandle; @@ -630,7 +637,10 @@ protected: } else { - if (ImGui::SliderFloat(param.name, &ui->values[i], param.min, param.max, param.format)) + const bool ret = param.log + ? ImGui::SliderFloat(param.name, &ui->values[i], param.min, param.max, param.format, 2.0f) + : ImGui::SliderFloat(param.name, &ui->values[i], param.min, param.max, param.format); + if (ret) { if (ImGui::IsItemActivated()) {