Reorder QML files to follow coding conventions
https://doc.qt.io/qt-5/qml-codingconventions.html#qml-object-declarations
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user