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), : UI(kInitialWidth, kInitialHeight),
fSampleRate(getSampleRate()), fSampleRate(getSampleRate()),
fResizable(isResizable()), fResizable(isResizable()),
fScale(getScaleFactor()),
fScale(1.0f),
fResizeHandle(this) fResizeHandle(this)
{ {
std::memset(fParameters, 0, sizeof(float)*kParameterCount); std::memset(fParameters, 0, sizeof(float)*kParameterCount);
@@ -46,10 +46,7 @@ public:
loadSharedResources(); loadSharedResources();
#endif #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 // no need to show resize handle if window is user-resizable
if (fResizable) if (fResizable)
@@ -187,7 +184,6 @@ protected:
y+=lineHeight; y+=lineHeight;
} }



void onResize(const ResizeEvent& ev) override void onResize(const ResizeEvent& ev) override
{ {
fScale = static_cast<float>(ev.size.getHeight())/static_cast<float>(kInitialHeight); fScale = static_cast<float>(ev.size.getHeight())/static_cast<float>(kInitialHeight);


Loading…
Cancel
Save