summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-03-14 16:24:04 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-03-14 16:24:04 +0100
commit47a7adf8236d48ae941e5a892d34f6b9488ddc08 (patch)
tree4095d728d71f7fa4df5b34a44f7c0e6cf729fd37
parentRemove some more allocations (diff)
downloadnheko-47a7adf8236d48ae941e5a892d34f6b9488ddc08.tar.xz
Use readonly properties where possible
-rw-r--r--resources/qml/MessageView.qml2
-rw-r--r--resources/qml/TimelineView.qml2
-rw-r--r--resources/qml/ui/Ripple.qml6
3 files changed, 5 insertions, 5 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml

index 1bc10b60..cad09475 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml
@@ -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 diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 8b98e113..02f6d5f4 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -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 diff --git a/resources/qml/ui/Ripple.qml b/resources/qml/ui/Ripple.qml
index b240f421..426182ee 100644 --- a/resources/qml/ui/Ripple.qml +++ b/resources/qml/ui/Ripple.qml
@@ -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