Add option to toggle the display of users avatar in timeline on and off
This commit is contained in:
@@ -50,7 +50,7 @@ RowLayout {
|
||||
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
visible: showAuthor
|
||||
visible: showAuthor && Config.showAvatarInTimeline
|
||||
name: author.displayName
|
||||
source: author.avatarMediaId ? "image://mxc/" + author.avatarMediaId : ""
|
||||
color: author.color
|
||||
@@ -70,7 +70,7 @@ RowLayout {
|
||||
Item {
|
||||
Layout.minimumWidth: Kirigami.Units.gridUnit * 2
|
||||
Layout.preferredHeight: 1
|
||||
visible: !showAuthor
|
||||
visible: !showAuthor && Config.showAvatarInTimeline
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ QQC2.AbstractButton {
|
||||
Layout.preferredWidth: Kirigami.Units.gridUnit
|
||||
Layout.preferredHeight: Kirigami.Units.gridUnit
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
visible: Config.showAvatarInTimeline
|
||||
source: replyVisible && reply.author.avatarMediaId ? "image://mxc/" + reply.author.avatarMediaId : ""
|
||||
name: replyVisible ? reply.author.displayName : "H"
|
||||
color: replyVisible ? reply.author.color : Kirigami.Theme.highlightColor
|
||||
|
||||
@@ -40,5 +40,11 @@ Kirigami.ScrollablePage {
|
||||
checked: Config.mergeRoomList
|
||||
onToggled: Config.mergeRoomList = true
|
||||
}
|
||||
QQC2.CheckBox {
|
||||
Kirigami.FormData.label: i18n("Timeline:")
|
||||
text: i18n("Show User Avatar")
|
||||
checked: Config.showAvatarInTimeline
|
||||
onToggled: Config.showAvatarInTimeline = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,5 +24,11 @@
|
||||
<default>true</default>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Timeline">
|
||||
<entry name="ShowAvatarInTimeline" type="bool">
|
||||
<label>Show avatar in the timeline</label>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user