Reorder QML files to follow coding conventions

https://doc.qt.io/qt-5/qml-codingconventions.html#qml-object-declarations
This commit is contained in:
miruka
2020-07-12 00:25:57 -04:00
parent 229fbee298
commit 3c7b78d4ca
131 changed files with 1022 additions and 1122 deletions

View File

@@ -5,21 +5,6 @@ import QtQuick.Controls 2.12
Rectangle {
id: avatar
implicitWidth: implicitHeight
implicitHeight:
compact ?
theme.controls.avatar.compactSize :
theme.controls.avatar.size
radius: theme.controls.avatar.radius
color: avatarImage.visible ? "transparent" : utils.hsluv(
name ? utils.hueFrom(name) : 0,
name ? theme.controls.avatar.background.saturation : 0,
theme.controls.avatar.background.lightness,
theme.controls.avatar.background.opacity
)
property bool compact: false
@@ -37,6 +22,21 @@ Rectangle {
readonly property alias circleRadius: avatarImage.circleRadius
implicitWidth: implicitHeight
implicitHeight:
compact ?
theme.controls.avatar.compactSize :
theme.controls.avatar.size
radius: theme.controls.avatar.radius
color: avatarImage.visible ? "transparent" : utils.hsluv(
name ? utils.hueFrom(name) : 0,
name ? theme.controls.avatar.background.saturation : 0,
theme.controls.avatar.background.lightness,
theme.controls.avatar.background.opacity
)
Behavior on color { HColorAnimation {} }
HLabel {
@@ -73,13 +73,6 @@ Rectangle {
HToolTip {
id: avatarToolTip
visible: ! avatarImage.broken &&
avatarImage.status !== Image.Error &&
avatarImage.width < dimension * 0.75 &&
(toolTipSourceOverride || toolTipMxc) &&
hoverHandler.hovered
delay: 1000
backgroundColor: theme.controls.avatar.hoveredImage.background
readonly property int dimension: Math.min(
mainUI.width / 1.25,
@@ -88,6 +81,14 @@ Rectangle {
background.border.width * 2,
)
visible: ! avatarImage.broken &&
avatarImage.status !== Image.Error &&
avatarImage.width < dimension * 0.75 &&
(toolTipSourceOverride || toolTipMxc) &&
hoverHandler.hovered
delay: 1000
backgroundColor: theme.controls.avatar.hoveredImage.background
contentItem: HMxcImage {
id: avatarToolTipImage
fillMode: Image.PreserveAspectCrop