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

@ -11,7 +11,7 @@ Row {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
readonly property real minWidth: 160
readonly property real maxWidth: 400

View file

@ -10,7 +10,7 @@ NIconButton {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
sizeRatio: 0.8
colorBg: Color.mSurfaceVariant

View file

@ -10,7 +10,7 @@ Item {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
property string barSection: ""
property int sectionWidgetIndex: 0
property int sectionWidgetsCount: 0

View file

@ -11,7 +11,7 @@ NIconButton {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
visible: Settings.data.network.bluetoothEnabled
sizeRatio: 0.8

View file

@ -9,7 +9,7 @@ Item {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
property string barSection: ""
property int sectionWidgetIndex: 0
property int sectionWidgetsCount: 0

View file

@ -8,7 +8,7 @@ Rectangle {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
implicitWidth: clock.width + Style.marginM * 2 * scaling
implicitHeight: Math.round(Style.capsuleHeight * scaling)

View file

@ -10,7 +10,7 @@ Row {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
property string barSection: ""
property int sectionWidgetIndex: 0
property int sectionWidgetsCount: 0

View file

@ -11,7 +11,7 @@ Row {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
readonly property real minWidth: 160
readonly property real maxWidth: 400

View file

@ -11,7 +11,7 @@ Item {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
property string barSection: ""
property int sectionWidgetIndex: 0
property int sectionWidgetsCount: 0

View file

@ -11,7 +11,7 @@ NIconButton {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
sizeRatio: 0.8

View file

@ -11,7 +11,7 @@ NIconButton {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
sizeRatio: 0.8
icon: "notifications"

View file

@ -10,7 +10,7 @@ NIconButton {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
property var powerProfiles: PowerProfiles
readonly property bool hasPP: powerProfiles.hasPerformanceProfile

View file

@ -8,7 +8,7 @@ NIconButton {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
visible: ScreenRecorderService.isRecording
icon: "videocam"

View file

@ -7,7 +7,7 @@ NIconButton {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
icon: "widgets"
tooltipText: "Open side panel"

View file

@ -8,7 +8,7 @@ Row {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
anchors.verticalCenter: parent.verticalCenter
spacing: Style.marginS * scaling

View file

@ -12,7 +12,7 @@ import qs.Widgets
Rectangle {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
readonly property real itemSize: Style.baseWidgetSize * 0.8 * scaling

View file

@ -14,7 +14,7 @@ Rectangle {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
readonly property real itemSize: 24 * scaling
visible: SystemTray.items.values.length > 0

View file

@ -11,7 +11,7 @@ Item {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
property string barSection: ""
property int sectionWidgetIndex: 0
property int sectionWidgetsCount: 0

View file

@ -11,7 +11,7 @@ NIconButton {
id: root
property ShellScreen screen
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
visible: Settings.data.network.wifiEnabled

View file

@ -12,7 +12,7 @@ Item {
id: root
property ShellScreen screen: null
property real scaling: ScalingService.scale(screen)
property real scaling: 1.0
property bool isDestroying: false
property bool hovered: false