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

Method buttonRect

app/src/Platform/CSD.cpp:381–388  ·  view source on GitHub ↗

* @brief Returns the bounding rectangle for a window control button. */

Source from the content-addressed store, hash-verified

379 * @brief Returns the bounding rectangle for a window control button.
380 */
381QRectF Titlebar::buttonRect(Button button) const
382{
383 const QRectF bgRect = buttonBackgroundRect(button);
384 const qreal iconSize = CSD::ButtonSize * 0.5;
385
386 return {
387 bgRect.center().x() - iconSize / 2, bgRect.center().y() - iconSize / 2, iconSize, iconSize};
388}
389
390/**
391 * @brief Returns the button (if any) at the given position.

Callers

nothing calls this directly

Calls 2

xMethod · 0.80
centerMethod · 0.80

Tested by

no test coverage detected