Files
TNCcat/qml/Desktop.qml
T
JulianandClaude Opus 5 9106ce47f4 Build only one window layout, so the eyes stop jumping
Main.qml declared both layouts at once: the small per-object windows and the
full-screen overlay. Both of them write the controller's catCenter, which is
where the eyes look for the cursor. Two bindings on one property overwrite each
other, so catCenter alternated every frame between the cat window's real centre
and the hidden overlay's, whose height is zero. look.y flipped between -0.495
and 1.0 sixty times a second and the pupils jumped with it.

Each layout now sits behind its own Loader and only the one the platform needs
is built. The small windows moved into Desktop.qml so a single component can
hold all three of them.

Measured in the running app while walking, the eye's vertical travel went from
2.6 px to 0.40 px, and look.y is now a single steady value. It also stops a
second, invisible cat from animating in the background.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 09:12:39 +02:00

32 lines
790 B
QML

pragma ComponentBehavior: Bound
import QtQuick
import TNCat
// The layout for platforms that let a client place its own window: one small
// window per object, moved around the screen by the app.
QtObject {
id: desktop
required property CatController cat
required property AppSettings settings
signal settingsRequested()
readonly property CatWindow catWindow: CatWindow {
cat: desktop.cat
settings: desktop.settings
visible: true
onSettingsRequested: desktop.settingsRequested()
}
readonly property ChipWindow chipWindow: ChipWindow {
cat: desktop.cat
settings: desktop.settings
}
readonly property CupWindow cupWindow: CupWindow {
cat: desktop.cat
settings: desktop.settings
}
}