DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 8a31a58740e634846f6dcb96df04c34958eba183
parent 9b9e0a36187a5a2f76add523f1eadfe8bf22dbdc
Author: falkTX <falktx@falktx.com>
Date:   Fri, 13 Aug 2021 21:46:42 +0100

Remove unneeded scale checking code in d_info

Diffstat:
Mexamples/Info/InfoExampleUI.cpp | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/examples/Info/InfoExampleUI.cpp b/examples/Info/InfoExampleUI.cpp @@ -34,7 +34,7 @@ public: : UI(kInitialWidth, kInitialHeight), fSampleRate(getSampleRate()), fResizable(isResizable()), - fScale(getScaleFactor()), + fScale(1.0f), fResizeHandle(this) { std::memset(fParameters, 0, sizeof(float)*kParameterCount); @@ -46,10 +46,7 @@ public: loadSharedResources(); #endif - if (d_isNotEqual(fScale, 1.0f)) - setSize(kInitialWidth * fScale, kInitialHeight * fScale); - - setGeometryConstraints(kInitialWidth * fScale, kInitialHeight * fScale, true); + setGeometryConstraints(kInitialWidth, kInitialHeight, true); // no need to show resize handle if window is user-resizable if (fResizable) @@ -187,7 +184,6 @@ protected: y+=lineHeight; } - void onResize(const ResizeEvent& ev) override { fScale = static_cast<float>(ev.size.getHeight())/static_cast<float>(kInitialHeight);