DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 73a855c3a8d3321f06fdeae9174e3eb50ad005b3
parent 94f148a575dc7a2282fc4de733cc97dfd41196f8
Author: falkTX <falktx@falktx.com>
Date:   Tue, 13 Sep 2022 21:06:00 +0100

Fix invalid initial size when using new ui size macros

Diffstat:
Mdistrho/src/DistrhoUI.cpp | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp @@ -238,13 +238,17 @@ UI::UI(const uint width, const uint height, const bool automaticallyScaleAndSetA #if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI if (width != 0 && height != 0) { - #ifndef DISTRHO_UI_DEFAULT_WIDTH Widget::setSize(width, height); - #endif if (automaticallyScaleAndSetAsMinimumSize) setGeometryConstraints(width, height, true, true, true); } + #ifdef DISTRHO_UI_DEFAULT_WIDTH + else + { + Widget::setSize(DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT); + } + #endif #else // unused (void)automaticallyScaleAndSetAsMinimumSize;