Use readonly properties where possible

This commit is contained in:
Nicolas Werner 2021-03-14 16:24:04 +01:00
parent 9b8e6c7f5c
commit 47a7adf823
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 5 additions and 5 deletions

View file

@ -43,7 +43,7 @@ ScrollView {
property alias model: row.model
// use comma to update on scroll
property var attachedPos: chat.contentY, attached ? chat.mapFromItem(attached, attached ? attached.width - width : 0, -height) : null
property int padding: 4
readonly property int padding: 4
visible: Settings.buttonsInTimeline && !!attached && (attached.hovered || messageActionHover.hovered)
x: attached ? attachedPos.x : 0

View file

@ -20,7 +20,7 @@ Page {
property var colors: currentActivePalette
property var systemInactive
property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive
property int avatarSize: 40
readonly property int avatarSize: 40
property real highlightHue: colors.highlight.hslHue
property real highlightSat: colors.highlight.hslSaturation
property real highlightLight: colors.highlight.hslLightness

View file

@ -13,9 +13,9 @@ Item {
property real radius: 0
property color color: "#22000000"
property real maxRadius: Math.max(width, height)
property real radiusAnimationRate: 0.05
property real radiusTailAnimationRate: 0.5
property real opacityAnimationDuration: 300
readonly property real radiusAnimationRate: 0.05
readonly property real radiusTailAnimationRate: 0.5
readonly property real opacityAnimationDuration: 300
readonly property real diameter: radius * 2
property real centerX
property real centerY