Browse Source

Tweaks to build with latest DPF

Signed-off-by: falkTX <falktx@falktx.com>
master
falkTX 4 weeks ago
parent
commit
0a1d48ad58
3 changed files with 9 additions and 5 deletions
  1. +1
    -1
      dpf
  2. +1
    -0
      plugins/glBars/DistrhoPluginInfo.h
  3. +7
    -4
      plugins/glBars/DistrhoUIGLBars.cpp

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit 7a056bbcf84f9437d7a00a5659be5bb6008bfe1d
Subproject commit f8a71fe521c068938093d3aaed1a7dbd04a03dcd

+ 1
- 0
plugins/glBars/DistrhoPluginInfo.h View File

@@ -30,6 +30,7 @@
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1
#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin"
#define DISTRHO_UI_USER_RESIZABLE 1

enum Parameters {
kParameterScale = 0,


+ 7
- 4
plugins/glBars/DistrhoUIGLBars.cpp View File

@@ -26,7 +26,10 @@ START_NAMESPACE_DISTRHO
// -----------------------------------------------------------------------

DistrhoUIGLBars::DistrhoUIGLBars()
: UI(512, 512) {}
: UI(512, 512)
{
setGeometryConstraints(256, 256, true);
}

DistrhoUIGLBars::~DistrhoUIGLBars()
{
@@ -103,14 +106,14 @@ bool DistrhoUIGLBars::onKeyboard(const KeyboardEvent& ev)
else if (ev.key == '+')
{
/**/ if (getWidth() < 1100 && getHeight() < 1100)
setSize(getWidth()+100, getHeight()+100);
setSize(std::min(getWidth()+100, 1100U), std::min(getHeight()+100, 1100U));
else if (getWidth() != 1100 || getHeight() != 1100)
setSize(1100, 1100);
}
else if (ev.key == '-')
{
/**/ if (getWidth() >= 200 && getHeight() >= 200)
setSize(getWidth()-100, getHeight()-100);
/**/ if (getWidth() > 100 && getHeight() > 100)
setSize(std::max(getWidth()-100, 100U), std::max(getHeight()-100, 100U));
else if (getWidth() != 100 || getHeight() != 100)
setSize(100, 100);
}


Loading…
Cancel
Save