MCPcopy Create free account
hub / github.com/DISTRHO/DPF / onReshape

Method onReshape

tests/Demo.cpp:346–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344 }
345
346 void onReshape(uint width, uint height) override
347 {
348 StandaloneWindow::onReshape(width, height);
349
350 const double scaleFactor = getScaleFactor();
351
352 if (width < kSidebarWidth * scaleFactor)
353 return;
354
355 const Size<uint> size(width - kSidebarWidth * scaleFactor, height);
356 wColor->setSize(size);
357 wImages->setSize(size);
358 wRects->setSize(size);
359 wShapes->setSize(size);
360 #ifdef DGL_OPENGL
361 wText->setSize(size);
362 #endif
363 wLeft->setSize((kSidebarWidth - 4) * scaleFactor, (height - 4) * scaleFactor);
364 }
365
366private:
367 ScopedPointer<ExampleColorSubWidget> wColor;

Callers

nothing calls this directly

Calls 3

onReshapeFunction · 0.85
getScaleFactorFunction · 0.50
setSizeMethod · 0.45

Tested by

no test coverage detected