Do not show resize handle on standalone
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
f5ca52b5e4
commit
1628f29a98
2
dpf
2
dpf
|
@ -1 +1 @@
|
|||
Subproject commit e512b25281af5887033dae4bfb1c10c40c18fde7
|
||||
Subproject commit 1bab2267628ec5c58e8b41d9df4f346bbde3545a
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "AsyncDialog.hpp"
|
||||
#include "PluginContext.hpp"
|
||||
#include "DistrhoPluginUtils.hpp"
|
||||
|
||||
#include <asset.hpp>
|
||||
#include <context.hpp>
|
||||
|
@ -58,6 +59,11 @@ namespace settings {
|
|||
int rateLimit = 0;
|
||||
}
|
||||
|
||||
bool isStandalone()
|
||||
{
|
||||
return std::strstr(getPluginFormatName(), "JACK") != nullptr;
|
||||
}
|
||||
|
||||
#ifdef ARCH_WIN
|
||||
std::string getSpecialPath(const SpecialPath type)
|
||||
{
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace window {
|
|||
void generateScreenshot();
|
||||
}
|
||||
|
||||
bool isStandalone();
|
||||
|
||||
#ifdef ARCH_WIN
|
||||
enum SpecialPath {
|
||||
kSpecialPathUserProfile,
|
||||
|
|
|
@ -127,7 +127,7 @@ struct ResizeHandle : widget::OpaqueWidget {
|
|||
|
||||
|
||||
struct Scene::Internal {
|
||||
ResizeHandle* resizeHandle;
|
||||
ResizeHandle* resizeHandle = nullptr;
|
||||
|
||||
bool heldArrowKeys[4] = {};
|
||||
|
||||
|
@ -173,6 +173,9 @@ Scene::Scene() {
|
|||
browser->hide();
|
||||
addChild(browser);
|
||||
|
||||
if (isStandalone())
|
||||
return;
|
||||
|
||||
internal->resizeHandle = new ResizeHandle;
|
||||
internal->resizeHandle->box.size = math::Vec(16, 16);
|
||||
addChild(internal->resizeHandle);
|
||||
|
@ -200,7 +203,8 @@ void Scene::step() {
|
|||
rackScroll->box.pos.y = menuBar->box.size.y;
|
||||
}
|
||||
|
||||
internal->resizeHandle->box.pos = box.size.minus(internal->resizeHandle->box.size);
|
||||
if (internal->resizeHandle != nullptr)
|
||||
internal->resizeHandle->box.pos = box.size.minus(internal->resizeHandle->box.size);
|
||||
|
||||
// Resize owned descendants
|
||||
menuBar->box.size.x = box.size.x;
|
||||
|
|
Loading…
Reference in New Issue