More careful UI creation
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
56400169d3
commit
0c7c99c8fc
3 changed files with 15 additions and 10 deletions
2
dpf
2
dpf
|
|
@ -1 +1 @@
|
||||||
Subproject commit 62996d5578702fde52e309528d6a4a894a7b3997
|
Subproject commit 497a831bd9ac0a9f28b581ea58fe8bfc0f95fff1
|
||||||
|
|
@ -109,18 +109,28 @@ public:
|
||||||
if (scaleFactor != 1)
|
if (scaleFactor != 1)
|
||||||
setSize(1228 * scaleFactor, 666 * scaleFactor);
|
setSize(1228 * scaleFactor, 666 * scaleFactor);
|
||||||
|
|
||||||
fContext->window = new rack::window::Window;
|
rack::window::Window* const window = new rack::window::Window;
|
||||||
|
rack::window::WindowInit(window, this);
|
||||||
|
|
||||||
{
|
{
|
||||||
const ScopedContext sc(this);
|
const MutexLocker cml(fContext->mutex);
|
||||||
rack::window::WindowInit(fContext->window, this);
|
rack::contextSet(fContext);
|
||||||
|
|
||||||
fContext->scene->removeChild(fContext->scene->menuBar);
|
fContext->scene->removeChild(fContext->scene->menuBar);
|
||||||
fContext->scene->menuBar = rack::app::createMenuBar(getWindow(), getApp().isStandalone());
|
fContext->scene->menuBar = rack::app::createMenuBar(getWindow(), getApp().isStandalone());
|
||||||
fContext->scene->addChildBelow(fContext->scene->menuBar, fContext->scene->rackScroll);
|
fContext->scene->addChildBelow(fContext->scene->menuBar, fContext->scene->rackScroll);
|
||||||
|
|
||||||
|
fContext->window = window;
|
||||||
|
|
||||||
|
rack::widget::Widget::ContextCreateEvent e;
|
||||||
|
fContext->scene->onContextCreate(e);
|
||||||
|
|
||||||
|
window->step();
|
||||||
|
|
||||||
|
rack::contextSet(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowParametersSetCallback(fContext->window, this);
|
WindowParametersSetCallback(window, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~CardinalUI() override
|
~CardinalUI() override
|
||||||
|
|
|
||||||
|
|
@ -148,11 +148,6 @@ void WindowInit(Window* const window, DISTRHO_NAMESPACE::UI* const ui)
|
||||||
|
|
||||||
// Init settings
|
// Init settings
|
||||||
WindowParametersRestore(window);
|
WindowParametersRestore(window);
|
||||||
|
|
||||||
if (APP->scene) {
|
|
||||||
widget::Widget::ContextCreateEvent e;
|
|
||||||
APP->scene->onContextCreate(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowMods(Window* const window, const int mods)
|
void WindowMods(Window* const window, const int mods)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue