Draw resize handle in UI rather than custom opengl; Set min size

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-12-14 22:14:44 +00:00
parent 43951635e9
commit 36f144e501
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
4 changed files with 67 additions and 24 deletions

View file

@ -180,6 +180,7 @@ GLFWAPI const char* glfwGetKeyName(const int key, int)
namespace rack {
namespace app {
widget::Widget* createMenuBar(bool isStandalone);
void hideResizeHandle(Scene* scene);
}
namespace window {
void WindowSetPluginUI(Window* window, DISTRHO_NAMESPACE::UI* ui);
@ -269,12 +270,19 @@ public:
context->nativeWindowId = window.getNativeWindowHandle();
if (isResizable())
fResizeHandle.hide();
hideResizeHandle(context->scene);
const double scaleFactor = getScaleFactor();
if (scaleFactor != 1)
{
setGeometryConstraints(640 * scaleFactor, 480 * scaleFactor);
setSize(1228 * scaleFactor, 666 * scaleFactor);
}
else
{
setGeometryConstraints(640, 480);
}
rack::contextSet(context);