Draw resize handle in UI rather than custom opengl; Set min size
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
43951635e9
commit
36f144e501
4 changed files with 67 additions and 24 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue