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

Function tileTwo

app/src/UI/WindowManager.cpp:262–274  ·  view source on GitHub ↗

* @brief Two windows split side-by-side or stacked depending on orientation. */

Source from the content-addressed store, hash-verified

260 * @brief Two windows split side-by-side or stacked depending on orientation.
261 */
262static void tileTwo(const QList<QQuickItem*>& wins, const TileEnv& env)
263{
264 if (env.isLandscape) {
265 const int w = (env.availW - env.spacing) / 2;
266 placeWindow(wins[0], env.margin, env.margin, w, env.availH);
267 placeWindow(wins[1], env.margin + w + env.spacing, env.margin, w, env.availH);
268 return;
269 }
270
271 const int h = (env.availH - env.spacing) / 2;
272 placeWindow(wins[0], env.margin, env.margin, env.availW, h);
273 placeWindow(wins[1], env.margin, env.margin + h + env.spacing, env.availW, h);
274}
275
276/**
277 * @brief Three windows in a master + 2-stack arrangement.

Callers 1

dispatchTileFunction · 0.85

Calls 1

placeWindowFunction · 0.85

Tested by

no test coverage detected