MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / tileSix

Function tileSix

app/src/UI/WindowManager.cpp:349–362  ·  view source on GitHub ↗

* @brief Six windows in a 3x2 or 2x3 grid based on canvas orientation. */

Source from the content-addressed store, hash-verified

347 * @brief Six windows in a 3x2 or 2x3 grid based on canvas orientation.
348 */
349static void tileSix(const QList<QQuickItem*>& wins, const TileEnv& env)
350{
351 const int cols = env.isLandscape ? 3 : 2;
352 const int rows = env.isLandscape ? 2 : 3;
353 const int w = (env.availW - (cols - 1) * env.spacing) / cols;
354 const int h = (env.availH - (rows - 1) * env.spacing) / rows;
355
356 for (int i = 0; i < 6; ++i) {
357 const int col = i % cols;
358 const int row = i / cols;
359 placeWindow(
360 wins[i], env.margin + col * (w + env.spacing), env.margin + row * (h + env.spacing), w, h);
361 }
362}
363
364/**
365 * @brief Seven or more windows distributed in an aspect-aware optimal grid.

Callers 1

dispatchTileFunction · 0.85

Calls 1

placeWindowFunction · 0.85

Tested by

no test coverage detected