Add layout diagnosis: font metrics in the log, --snapshot option

On the Steam Frame, the fixed 1200x800 QML layout overflows: about the
bottom quarter is cut off and the navigation icons overlap their text.
Forcing 96 DPI and switching the Quick Controls style didn't help, so the
cause has to be measured rather than guessed.

- SetWidget() logs the application font (family, pt, px), what 20 pt
  (MyText) is in px, the screen's DPI and the device pixel ratio.
- --snapshot <file> writes the rendered overlay (RenderBackend::readback)
  as PNG at most once per second while it is visible. A time interval,
  because OVRAS only renders when the scene changes. Written to a
  temporary file and renamed, so readers never see a partial file.
- run.sh passes arguments after the graphics API to the program.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 00:06:09 +02:00
co-authored by Claude Opus 5.5
parent bbb3d1ba0e
commit d664f86945
9 changed files with 122 additions and 13 deletions
+1
View File
@@ -97,6 +97,7 @@ int main( int argc, char* argv[] )
commandLineArgs.forceNoSound,
qmlEngine,
std::move( renderBackend ) ) );
controller->setSnapshotPath( commandLineArgs.snapshotPath );
//const auto url
// = QUrl( ":/qt/qml/AdvancedSettings/src/res/qml/common/mainwidget.qml" );
QQmlComponent component( &qmlEngine, ":/qt/qml/AdvancedSettings/src/res/qml/common/mainwidget.qml" );