Fix the collapsed cat window on Linux, warn about the compositor
The CatDefs singleton did not resolve on the reporter's Linux build, which showed up as "property mood of object CatDefs is not a function". The same lookup failure made CatDefs.aspect undefined, so the cat window's height became NaN and the cat rendered as a moving line. The mug survived because its height used a literal ratio. The singleton is gone rather than repaired, since nothing in it had to be shared. The mood name now comes from C++, derived from the enum key, so there is one source of truth instead of a list in QML that had to match. Window sizes now follow the implicit size of the drawing they contain, so the proportions live in the one file that defines them. Also for X11: TNCat now warns, naming Xfce's compositor setting, when its window comes up without an alpha channel, which is what a missing compositor looks like and why the mug had a black background. Opaque mode no longer hides the chip and the mug. TNCAT_DEBUG=1 logs window geometry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9106ce47f4
commit
0aceb3665d
12 files changed
+94
-36
No files matched your search
+1
-3
@@ -23,14 +23,12 @@ target_include_directories(tncat PRIVATE src)
|
||||
|
||||
# QML files live in qml/ but register at the module root (TNCat.Main etc.)
|
||||
set(TNCAT_QML Main Desktop Cat Chip Cup CatWindow ChipWindow CupWindow OverlayWindow
|
||||
SettingsWindow AppButton AppSlider AppToggle SettingsGroup CatDefs)
|
||||
SettingsWindow AppButton AppSlider AppToggle SettingsGroup)
|
||||
foreach(qmlfile IN LISTS TNCAT_QML)
|
||||
set_source_files_properties(qml/${qmlfile}.qml PROPERTIES QT_RESOURCE_ALIAS ${qmlfile}.qml)
|
||||
list(APPEND TNCAT_QML_FILES qml/${qmlfile}.qml)
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(qml/CatDefs.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
||||
|
||||
qt_add_qml_module(tncat
|
||||
URI TNCat
|
||||
VERSION 1.0
|
||||
|
||||
Reference in new issue
Block a user