Browse Source

Remove unneeded scale checking code in d_info

pull/309/head
falkTX 3 years ago
parent
commit
8a31a58740
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      examples/Info/InfoExampleUI.cpp

+ 2
- 6
examples/Info/InfoExampleUI.cpp View File

@@ -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);


Loading…
Cancel
Save