commit 62ba84882410fd7ca3fcbfe417a731494b57cf2d
parent c2341b1cadbca2019719bf9a55418325075b435f
Author: falkTX <falktx@falktx.com>
Date: Wed, 15 Dec 2021 23:26:40 +0000
Fix setGeometryConstraints on macOS, aspect ratio was always on
Diffstat:
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/dgl/src/pugl.cpp b/dgl/src/pugl.cpp
@@ -325,20 +325,12 @@ PuglStatus puglSetGeometryConstraints(PuglView* const view, const uint width, co
view->maxAspectY = (int)height;
}
-#if defined(DISTRHO_OS_HAIKU)
- // nothing?
-#elif defined(DISTRHO_OS_MAC)
- /*
- if (view->impl->window)
- {
- [view->impl->window setContentMinSize:sizePoints(view, view->minWidth, view->minHeight)];
+#if defined(DISTRHO_OS_HAIKU) || defined(DISTRHO_OS_MAC)
+ puglSetMinSize(view, width, height);
- if (aspect)
- [view->impl->window setContentAspectRatio:sizePoints(view, view->minAspectX, view->minAspectY)];
+ if (aspect) {
+ puglSetAspectRatio(view, width, height, width, height);
}
- */
- puglSetMinSize(view, width, height);
- puglSetAspectRatio(view, width, height, width, height);
#elif defined(DISTRHO_OS_WINDOWS)
// nothing
#else