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

Function liftSnapBottom

app/src/UI/WindowManager.cpp:157–163  ·  view source on GitHub ↗

* @brief Shrinks a snap rectangle when its bottom reaches the canvas floor, * keeping the border clear of the taskbar (canvas overlaps it 1px). */

Source from the content-addressed store, hash-verified

155 * keeping the border clear of the taskbar (canvas overlaps it 1px).
156 */
157static QRect liftSnapBottom(QRect rect, int ch)
158{
159 if (rect.y() + rect.height() >= ch)
160 rect.setHeight(rect.height() - 2);
161
162 return rect;
163}
164
165/**
166 * @brief Returns the manual-mode snap rectangle for the dragged window's edges.

Callers 2

computeSnapRectFunction · 0.85
handleDragMoveMethod · 0.85

Calls 1

heightMethod · 0.80

Tested by

no test coverage detected