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

Method frameTopInset

app/src/Platform/NativeWindow_CSD.cpp:163–176  ·  view source on GitHub ↗

* @brief Returns the total top inset (shadow + CSD titlebar) reserved above the content area. */

Source from the content-addressed store, hash-verified

161 * @brief Returns the total top inset (shadow + CSD titlebar) reserved above the content area.
162 */
163int NativeWindow::frameTopInset(QObject* window)
164{
165 auto* w = qobject_cast<QWindow*>(window);
166 if (!w)
167 return 0;
168
169 if (isWindows11() || !m_csdEnabled)
170 return 0;
171
172 if (auto* decorator = s_decorators.value(w, nullptr))
173 return decorator->shadowMargin() + decorator->titleBarHeight();
174
175 return (m_csdShadowEnabled ? CSD::ShadowRadius : 0) + CSD::TitleBarHeight;
176}
177
178/**
179 * @brief Removes a window from the management list.

Callers

nothing calls this directly

Calls 4

isWindows11Function · 0.85
shadowMarginMethod · 0.80
titleBarHeightMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected