Files
TNCcat/qml/CatDefs.qml
T
JulianandClaude Opus 5 6b9553f6d4 Stop clipping the cat at the window edge
The cat was drawn in a 100 x 90 box that was exactly the window, so anything
reaching past it was cut off: the right whiskers always, and more of them in
poses that push the head forward, up to art x 109 while stretching.

The window box is now 120 x 106 with the drawing inset at (7, 14). The slack is
symmetric on purpose, because facing left mirrors the art about the box centre,
so asymmetric slack would clip the other side instead.

The mood-name mapper grew the shared aspect ratio and became CatDefs, so every
window sizes the cat the same way. Nose and mug offsets follow the new inset.

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

17 lines
640 B
QML

pragma Singleton
import QtQuick
// Shared facts about the drawing, so every window sizes the cat the same way.
QtObject {
// Cat.qml draws in a 100 x 90 box inside a 120 x 106 window box. The slack
// holds the whiskers, the tail and the glyphs that float above the head.
readonly property real aspect: 106 / 120
readonly property var moodNames: ["walking", "running", "sitting", "grooming", "stretching",
"sleeping", "loving", "alert", "chasing", "batting", "drinking"]
function mood(value) {
return moodNames[value] !== undefined ? moodNames[value] : "sitting"
}
}