Browse Source

Fix invalid initial size when using new ui size macros

pull/321/merge
falkTX 2 years ago
parent
commit
73a855c3a8
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      distrho/src/DistrhoUI.cpp

+ 6
- 2
distrho/src/DistrhoUI.cpp View File

@@ -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;


Loading…
Cancel
Save