mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioPluginHost: Added an application-level setting for scaling plug-ins on Windows
This commit is contained in:
parent
b1253bfc74
commit
3a0af69eff
8 changed files with 233 additions and 75 deletions
|
|
@ -403,21 +403,14 @@ struct GraphEditorPanel::PluginComponent : public Component,
|
|||
menu->addItem (2, "Disconnect all pins");
|
||||
menu->addItem (3, "Toggle Bypass");
|
||||
|
||||
if (getProcessor()->hasEditor())
|
||||
{
|
||||
menu->addSeparator();
|
||||
menu->addItem (10, "Show plugin GUI");
|
||||
menu->addItem (11, "Show all programs");
|
||||
menu->addItem (12, "Show all parameters");
|
||||
#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE
|
||||
auto isTicked = false;
|
||||
if (auto* node = graph.graph.getNodeForId (pluginID))
|
||||
isTicked = node->properties["DPIAware"];
|
||||
menu->addSeparator();
|
||||
menu->addItem (10, "Show plugin GUI");
|
||||
menu->addItem (11, "Show all programs");
|
||||
menu->addItem (12, "Show all parameters");
|
||||
menu->addItem (13, "Show debug log");
|
||||
|
||||
menu->addItem (13, "Enable DPI awareness", true, isTicked);
|
||||
#endif
|
||||
menu->addItem (14, "Show debug log");
|
||||
}
|
||||
if (autoScaleOptionAvailable)
|
||||
addPluginAutoScaleOptionsSubMenu (dynamic_cast<AudioPluginInstance*> (getProcessor()), *menu);
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addItem (20, "Configure Audio I/O");
|
||||
|
|
@ -441,15 +434,7 @@ struct GraphEditorPanel::PluginComponent : public Component,
|
|||
case 10: showWindow (PluginWindow::Type::normal); break;
|
||||
case 11: showWindow (PluginWindow::Type::programs); break;
|
||||
case 12: showWindow (PluginWindow::Type::generic) ; break;
|
||||
#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE
|
||||
case 13:
|
||||
{
|
||||
if (auto* node = graph.graph.getNodeForId (pluginID))
|
||||
node->properties.set ("DPIAware", ! node->properties ["DPIAware"]);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case 14: showWindow (PluginWindow::Type::debug); break;
|
||||
case 13: showWindow (PluginWindow::Type::debug); break;
|
||||
case 20: showWindow (PluginWindow::Type::audioIO); break;
|
||||
case 21: testStateSaveLoad(); break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue