Use the Fusion Quick Controls style; drop the Material import
On the Steam Frame, the fixed 1200x800 layout lost about its bottom quarter. Measured with --snapshot: fonts and DPI are as intended, but the controls ran in the Material style. The qt6 branch changed mainwidget.qml's "import QtQuick.Controls" into "import QtQuick.Controls.Material", which fixes Material for all controls and even overrides QT_QUICK_CONTROLS_STYLE. Material's insets and padding make the navigation buttons 65 px tall instead of 45 px (Fusion) or 49 px (Basic, Qt 5's default style renamed); nothing in the file uses Material. mainwidget.qml imports QtQuick.Controls again, and main.cpp sets Fusion explicitly, so the sizes are the same on every platform instead of depending on Qt 6's per-platform default. With Basic the last navigation button is still cut off on the Frame; with Fusion everything fits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -288,6 +288,27 @@ URL: "steam://launch/1009850/openvroverlay" auto-launch: true`.
|
||||
generated `run.sh` checked with `sh -n`. No new warnings in the changed lines.
|
||||
- **Not tested yet:** on the Frame (log line "Font: …", PNG written).
|
||||
|
||||
### Fix: Quick Controls style Fusion (2026-10-08)
|
||||
|
||||
- **Measurements on the Frame** (snapshots of the root page, OpenGL):
|
||||
- Log: `Font: "Noto Sans" 9 pt = 12 px (requested "Sans Serif" 9 pt); 20 pt = 27 px;
|
||||
screen "gamescope" logical DPI 96 physical DPI 63.972 device pixel ratio 1`. Fonts, DPI
|
||||
and scaling are as intended.
|
||||
- The PNG itself is cut off: OVRAS renders the content too large; SteamVR doesn't crop.
|
||||
- Navigation buttons: as `qt6` is, 65 px (pitch 75) = Material. With
|
||||
`QT_QUICK_CONTROLS_STYLE=Basic` (verified in the process environment): identical, the
|
||||
import overrides it. Test build without the Material import (not committed): 45 px
|
||||
(pitch 55) = Fusion, **everything fits**. Same build with Basic: 49 px (pitch 59), the
|
||||
last button is cut off.
|
||||
- **Fix (DESIGN.md section 11):** `mainwidget.qml` imports `QtQuick.Controls` again;
|
||||
`main.cpp` sets `QQuickStyle::setStyle("Fusion")`.
|
||||
- **Result:** cross build and package succeed, `Qt_6_PRIVATE_API` without `QVulkan*`: 0.
|
||||
- **Not tested yet:** the committed build on the Frame (expected as in the test build);
|
||||
the other pages.
|
||||
- **Seen, not changed:** on "Chaperone" and "Space Fix" the icon still overlaps the text
|
||||
slightly (`MyPushButton`: icon as wide as the button is high, text only indented by
|
||||
spaces).
|
||||
|
||||
### Test checklist on the Frame (step 5)
|
||||
|
||||
Deploy: `build_scripts/steamframe/deploy-to-frame.sh <user>@<frame>` (SteamVR running).
|
||||
|
||||
Reference in New Issue
Block a user