Skip to content

Commit 1cd1028

Browse files
committed
0.16.2
1 parent 2d10431 commit 1cd1028

File tree

8 files changed

+20
-28
lines changed

8 files changed

+20
-28
lines changed

buildspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@
4343
"uuids": {
4444
"windowsApp": "ad885c58-5ca9-44de-8f4f-1c12676626a9"
4545
},
46-
"version": "0.16.1",
46+
"version": "0.16.2",
4747
"website": "https://www.atkaudio.com"
4848
}

lib/atkaudio/JUCE/modules/juce_gui_basics/native/juce_Windowing_windows.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,8 @@ static void setDPIAwareness()
414414

415415
hasCheckedForDPIAwareness = true;
416416

417-
if (! JUCEApplicationBase::isStandaloneApp())
418-
return;
417+
// if (! JUCEApplicationBase::isStandaloneApp())
418+
// return;
419419

420420
loadDPIAwarenessFunctions();
421421

lib/atkaudio/src/atkaudio/PluginHost/JuceHostPlugin.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -639,17 +639,14 @@ class HostAudioProcessorEditor final : public AudioProcessorEditor
639639
)
640640
, scopedCallback(owner.pluginChanged, [this] { pluginChanged(); })
641641
{
642-
currentScaleFactor =
643-
juce::Desktop::getInstance().getDisplays().getDisplayForRect(getLocalBounds())->dpi / atk::DPI_NORMAL;
644-
645642
setSize(500, 500);
646643
setResizable(false, false);
647-
addAndMakeVisible(closeButton);
644+
// addAndMakeVisible(closeButton);
648645
addAndMakeVisible(loader);
649646

650647
hostProcessor.pluginChanged();
651648

652-
closeButton.onClick = [this] { clearPlugin(); };
649+
// closeButton.onClick = [this] { clearPlugin(); };
653650
}
654651

655652
void parentSizeChanged() override
@@ -663,7 +660,7 @@ class HostAudioProcessorEditor final : public AudioProcessorEditor
663660

664661
void resized() override
665662
{
666-
closeButton.setBounds(getLocalBounds().withSizeKeepingCentre(200, buttonHeight));
663+
// closeButton.setBounds(getLocalBounds().withSizeKeepingCentre(200, buttonHeight));
667664
loader.setBounds(getLocalBounds());
668665
}
669666

@@ -698,7 +695,7 @@ class HostAudioProcessorEditor final : public AudioProcessorEditor
698695
void pluginChanged()
699696
{
700697
loader.setVisible(!hostProcessor.isPluginLoaded());
701-
closeButton.setVisible(hostProcessor.isPluginLoaded());
698+
// closeButton.setVisible(hostProcessor.isPluginLoaded());
702699

703700
if (hostProcessor.isPluginLoaded())
704701
{
@@ -758,7 +755,7 @@ class HostAudioProcessorEditor final : public AudioProcessorEditor
758755
std::unique_ptr<Component> editor;
759756
PluginEditorComponent* currentEditorComponent = nullptr;
760757
ScopedValueSetter<std::function<void()>> scopedCallback;
761-
TextButton closeButton{"Close Plugin"};
758+
// TextButton closeButton{"Close Plugin"};
762759
float currentScaleFactor = 1.0f;
763760

764761
juce::SharedResourcePointer<atk::LookAndFeel> lookAndFeel;

lib/atkaudio/src/atkaudio/PluginHost/StandaloneFilterWindow.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,13 @@ class StandaloneFilterWindow
663663
pluginHolder = nullptr;
664664
}
665665

666+
void visibilityChanged() override
667+
{
668+
clearContentComponent();
669+
if (isVisible())
670+
updateContent();
671+
}
672+
666673
//==============================================================================
667674
AudioProcessor* getAudioProcessor() const noexcept
668675
{

lib/atkaudio/src/atkaudio/PluginHost2/Plugins/PluginGraph.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
static std::unique_ptr<ScopedDPIAwarenessDisabler> makeDPIAwarenessDisablerForPlugin(const PluginDescription& desc)
88
{
9-
return nullptr; // shouldAutoScalePlugin(desc) ? std::make_unique<ScopedDPIAwarenessDisabler>() : nullptr;
9+
// return std::make_unique<ScopedDPIAwarenessDisabler>();
10+
return nullptr;
1011
}
1112

1213
//==============================================================================
@@ -402,8 +403,8 @@ void PluginGraph::createNodeFromXml(const XmlElement& xml)
402403
);
403404

404405
#if JUCE_PLUGINHOST_ARA && (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX)
405-
if (instance && description.useARA == PluginDescriptionAndPreference::UseARA::yes &&
406-
description.pluginDescription.hasARAExtension)
406+
if (instance && description.useARA == PluginDescriptionAndPreference::UseARA::yes
407+
&& description.pluginDescription.hasARAExtension)
407408
{
408409
return std::make_unique<ARAPluginInstanceWrapper>(std::move(instance));
409410
}

lib/atkaudio/src/atkaudio/PluginHost2/UI/PluginWindow.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ class PluginWindow final : public DocumentWindow
164164
{
165165
setContentOwned(ui, true);
166166
setResizable(ui->isResizable(), false);
167-
// ui->setScaleFactor(
168-
// juce::Desktop::getInstance().getDisplays().getDisplayForRect(getLocalBounds())->dpi / atk::DPI_NORMAL
169-
// );
170167
}
171168

172169
setConstrainer(&constrainer);
@@ -203,11 +200,6 @@ class PluginWindow final : public DocumentWindow
203200
{
204201
node->properties.set(getLastXProp(type), getX());
205202
node->properties.set(getLastYProp(type), getY());
206-
207-
if (auto* content = dynamic_cast<AudioProcessorEditor*>(getContentComponent()))
208-
content->setScaleFactor(
209-
juce::Desktop::getInstance().getDisplays().getDisplayForRect(getLocalBounds())->dpi / atk::DPI_NORMAL
210-
);
211203
}
212204

213205
void closeButtonPressed() override
@@ -282,8 +274,7 @@ class PluginWindow final : public DocumentWindow
282274

283275
float getDesktopScaleFactor() const override
284276
{
285-
auto bounds = getLocalBounds();
286-
return juce::Desktop::getInstance().getDisplays().getDisplayForRect(bounds)->dpi / atk::DPI_NORMAL;
277+
return 1.0f;
287278
}
288279

289280
static AudioProcessorEditor* createProcessorEditor(AudioProcessor& processor, PluginWindow::Type type)

lib/atkaudio/src/atkaudio/atkaudio.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ void atk::create()
1010
juce::initialiseJuce_GUI();
1111
juce::MessageManager::getInstance()->setCurrentThreadAsMessageThread();
1212
updateCheck = new UpdateCheck(); // deleted at shutdown
13-
auto scaleFactor = juce::Desktop::getInstance().getDisplays().getPrimaryDisplay()->dpi / atk::DPI_NORMAL;
14-
juce::Desktop::getInstance().setGlobalScaleFactor(scaleFactor);
1513
}
1614

1715
void atk::pump()

lib/atkaudio/src/atkaudio/atkaudio.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
namespace atk
66
{
77

8-
constexpr auto DPI_NORMAL = 96.0f;
9-
108
extern "C" void create();
119
extern "C" void destroy();
1210
extern "C" void pump();

0 commit comments

Comments
 (0)