1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-24 01:54:22 +00:00

AudioPluginHost: Allow resizing plugins from the host, and increase border size on mobile

The increased border size should make it slightly less fiddly to tap on
the window border.
This commit is contained in:
reuk 2021-03-24 16:43:25 +00:00
parent bc660e8218
commit de278cf555
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
2 changed files with 11 additions and 2 deletions

View file

@ -146,6 +146,7 @@ public:
activeWindowList (windowList),
node (n), type (t)
{
setResizable (true, false);
setSize (400, 300);
if (auto* ui = createProcessorEditor (*node->getProcessor(), type))
@ -194,6 +195,16 @@ public:
const AudioProcessorGraph::Node::Ptr node;
const Type type;
BorderSize<int> getBorderThickness() override
{
#if JUCE_IOS || JUCE_ANDROID
const int border = 10;
return { border, border, border, border };
#else
return DocumentWindow::getBorderThickness();
#endif
}
private:
float getDesktopScaleFactor() const override { return 1.0f; }

View file

@ -199,8 +199,6 @@ void LookAndFeel_V4::positionDocumentWindowButtons (DocumentWindow&,
Button* closeButton,
bool positionTitleBarButtonsOnLeft)
{
titleBarH = jmin (titleBarH, titleBarH - titleBarY);
auto buttonW = static_cast<int> (titleBarH * 1.2);
auto x = positionTitleBarButtonsOnLeft ? titleBarX