Improve avatar look and layouting
Thanks to red_sky for the feedback!
4 files changed, 10 insertions, 5 deletions
diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml
index 131e6b46..a53f057b 100644
--- a/resources/qml/Avatar.qml
+++ b/resources/qml/Avatar.qml
@@ -31,6 +31,11 @@ Rectangle {
anchors.fill: parent
asynchronous: true
fillMode: Image.PreserveAspectCrop
+ mipmap: true
+ smooth: false
+
+ sourceSize.width: avatar.width
+ sourceSize.height: avatar.height
layer.enabled: true
layer.effect: OpacityMask {
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index 66d44622..b9fa6f40 100644
--- a/resources/qml/TimelineRow.qml
+++ b/resources/qml/TimelineRow.qml
@@ -12,7 +12,6 @@ RowLayout {
property var view: chat
anchors.leftMargin: avatarSize + 4
- anchors.rightMargin: scrollbar.width
anchors.left: parent.left
anchors.right: parent.right
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index e5c1bda6..8f64637e 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -14,7 +14,7 @@ Rectangle {
property var colors: currentActivePalette
property var systemInactive: SystemPalette { colorGroup: SystemPalette.Disabled }
property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive
- property int avatarSize: 32
+ property int avatarSize: 40
color: colors.window
@@ -34,6 +34,9 @@ Rectangle {
visible: timelineManager.timeline != null
anchors.fill: parent
+ anchors.leftMargin: 4
+ anchors.rightMargin: scrollbar.width
+
model: timelineManager.timeline
onModelChanged: {
@@ -54,7 +57,7 @@ Rectangle {
ScrollBar.vertical: ScrollBar {
id: scrollbar
anchors.top: parent.top
- anchors.right: parent.right
+ anchors.left: parent.right
anchors.bottom: parent.bottom
onPressedChanged: if (!pressed) chat.updatePosition()
}
diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index 3d892b76..49209f68 100644
--- a/resources/qml/delegates/MessageDelegate.qml
+++ b/resources/qml/delegates/MessageDelegate.qml
@@ -5,8 +5,6 @@ DelegateChooser {
//role: "type" //< not supported in our custom implementation, have to use roleValue
roleValue: model.type
- width: parent.width
-
DelegateChoice {
roleValue: MtxEvent.TextMessage
TextMessage {}
|