ScalingService: 1st pass of the refactoring via signals instead of nested bindings for better efficienty and compatibility with old versions of Qt

This commit is contained in:
LemmyCook 2025-09-01 13:52:12 -04:00
parent 934c8c61b3
commit 210bbac583
31 changed files with 186 additions and 56 deletions

View file

@ -10,6 +10,15 @@ Item {
property var widgetProps: ({})
property bool enabled: true
Connections {
target: ScalingService
function onScaleChanged(screenName, scale) {
if ((loader.item.screen !== null) && (screenName === loader.item.screen.name)) {
loader.item['scaling'] = scale
}
}
}
// Don't reserve space unless the loaded widget is really visible
implicitWidth: loader.item ? loader.item.visible ? loader.item.implicitWidth : 0 : 0
implicitHeight: loader.item ? loader.item.visible ? loader.item.implicitHeight : 0 : 0