Code cleanup && add minimum room management. #13
This commit is contained in:
@@ -2,6 +2,8 @@ import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
Row {
|
||||
readonly property bool avatarVisible: !sentByMe && aboveAuthor !== author || section !== aboveSection
|
||||
|
||||
spacing: 6
|
||||
|
||||
ImageStatus {
|
||||
@@ -10,7 +12,7 @@ Row {
|
||||
width: height
|
||||
height: 40
|
||||
round: false
|
||||
visible: !sentByMe && aboveAuthor !== author
|
||||
visible: avatarVisible
|
||||
source: author.avatarUrl != "" ? "image://mxc/" + author.avatarUrl : null
|
||||
displayText: author.displayName
|
||||
|
||||
@@ -27,6 +29,6 @@ Row {
|
||||
width: height
|
||||
height: 40
|
||||
color: "transparent"
|
||||
visible: !sentByMe && aboveAuthor === author
|
||||
visible: !avatarVisible
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
ItemDelegate {
|
||||
id: itemDelegate
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Material 2.2
|
||||
|
||||
Item {
|
||||
property bool opaqueBackground: false
|
||||
property bool round: true
|
||||
property string source: ""
|
||||
property string displayText: ""
|
||||
@@ -13,14 +12,6 @@ Item {
|
||||
|
||||
id: item
|
||||
|
||||
Rectangle {
|
||||
width: item.width
|
||||
height: item.width
|
||||
radius: round ? item.width / 2 : 0
|
||||
color: "white"
|
||||
visible: opaqueBackground
|
||||
}
|
||||
|
||||
Image {
|
||||
id: avatar
|
||||
width: item.width
|
||||
|
||||
@@ -3,9 +3,6 @@ import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls.Material 2.2
|
||||
|
||||
Item {
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Material.accent
|
||||
}
|
||||
Rectangle {
|
||||
color: Material.accent
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonDelegate {
|
||||
ItemDelegate {
|
||||
id: buttonDelegate
|
||||
anchors.fill: parent
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import QtQuick.Layouts 1.3
|
||||
Rectangle {
|
||||
property bool flat: false
|
||||
property bool highlighted: false
|
||||
property string displayText
|
||||
property string displayText: ""
|
||||
property alias timeLabelVisible: timeText.visible
|
||||
|
||||
property int maximumWidth
|
||||
|
||||
Reference in New Issue
Block a user