Browse Source

Fix external UI build

pull/87/head
Patrick Desaulniers 7 years ago
parent
commit
b591441043
4 changed files with 7 additions and 2 deletions
  1. +2
    -0
      distrho/DistrhoUI.hpp
  2. +1
    -1
      distrho/src/DistrhoPluginVST.cpp
  3. +3
    -0
      distrho/src/DistrhoUI.cpp
  4. +1
    -1
      distrho/src/DistrhoUILV2.cpp

+ 2
- 0
distrho/DistrhoUI.hpp View File

@@ -67,12 +67,14 @@ public:
*/
bool isUserResizable() const noexcept;

#ifdef HAVE_DGL
/**
Set geometry constraints for the UI when resized by the user, and optionally scale UI automatically.
@see Window::setGeometryConstraints(uint,uint,bool)
@see Window::setScaling(double)
*/
void setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale = false);
#endif

/* --------------------------------------------------------------------------------------------------------
* Host state */


+ 1
- 1
distrho/src/DistrhoPluginVST.cpp View File

@@ -328,7 +328,7 @@ protected:

void setSize(const uint width, const uint height)
{
fUI.setWindowSize(width, height);
fUI.setWindowSize(width, height, false);
hostCallback(audioMasterSizeWindow, width, height);
}



+ 3
- 0
distrho/src/DistrhoUI.cpp View File

@@ -62,6 +62,7 @@ bool UI::isUserResizable() const noexcept
return pData->userResizable;
}

#ifdef HAVE_DGL
void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale)
{
DISTRHO_SAFE_ASSERT_RETURN(minWidth > 0,);
@@ -72,7 +73,9 @@ void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRa
pData->minHeight = minHeight;

getParentWindow().setGeometryConstraints(minWidth, minHeight, keepAspectRatio);

}
#endif

/* ------------------------------------------------------------------------------------------------------------
* Host state */


+ 1
- 1
distrho/src/DistrhoUILV2.cpp View File

@@ -292,7 +292,7 @@ protected:

void setSize(const uint width, const uint height)
{
fUI.setWindowSize(width, height);
fUI.setWindowSize(width, height, false);

if (fUiResize != nullptr && ! fWinIdWasNull)
fUiResize->ui_resize(fUiResize->handle, width, height);


Loading…
Cancel
Save