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

Method frameMargin

app/src/Platform/NativeWindow_CSD.cpp:145–158  ·  view source on GitHub ↗

* @brief Returns the horizontal/bottom shadow margin reserved by CSD around the content area. */

Source from the content-addressed store, hash-verified

143 * @brief Returns the horizontal/bottom shadow margin reserved by CSD around the content area.
144 */
145int NativeWindow::frameMargin(QObject* window)
146{
147 auto* w = qobject_cast<QWindow*>(window);
148 if (!w)
149 return 0;
150
151 if (isWindows11() || !m_csdEnabled)
152 return 0;
153
154 if (auto* decorator = s_decorators.value(w, nullptr))
155 return decorator->shadowMargin();
156
157 return m_csdShadowEnabled ? CSD::ShadowRadius : 0;
158}
159
160/**
161 * @brief Returns the total top inset (shadow + CSD titlebar) reserved above the content area.

Callers

nothing calls this directly

Calls 3

isWindows11Function · 0.85
shadowMarginMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected