Fix margins for images and videos
This patch makes it so that the margins for images and videos is the same as other components.
This commit is contained in:
@@ -27,8 +27,6 @@ TimelineContainer {
|
|||||||
}
|
}
|
||||||
Loader {
|
Loader {
|
||||||
id: linkPreviewLoader
|
id: linkPreviewLoader
|
||||||
Layout.rightMargin: Kirigami.Units.largeSpacing
|
|
||||||
Layout.leftMargin: Kirigami.Units.largeSpacing
|
|
||||||
height: active ? item.implicitHeight : 0
|
height: active ? item.implicitHeight : 0
|
||||||
active: !currentRoom.usesEncryption && model.display && model.display.includes("http")
|
active: !currentRoom.usesEncryption && model.display && model.display.includes("http")
|
||||||
visible: active
|
visible: active
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ TextEdit {
|
|||||||
ListView.onReused: Qt.binding(() => !hasSpoiler.test(textMessage))
|
ListView.onReused: Qt.binding(() => !hasSpoiler.test(textMessage))
|
||||||
|
|
||||||
Layout.fillWidth: Config.compactLayout
|
Layout.fillWidth: Config.compactLayout
|
||||||
Layout.rightMargin: Kirigami.Units.largeSpacing
|
|
||||||
Layout.leftMargin: Kirigami.Units.largeSpacing
|
|
||||||
|
|
||||||
persistentSelection: true
|
persistentSelection: true
|
||||||
|
|
||||||
|
|||||||
@@ -140,8 +140,8 @@ QQC2.ItemDelegate {
|
|||||||
id: bubble
|
id: bubble
|
||||||
topPadding: Config.compactLayout ? Kirigami.Units.smallSpacing / 2 : Kirigami.Units.largeSpacing
|
topPadding: Config.compactLayout ? Kirigami.Units.smallSpacing / 2 : Kirigami.Units.largeSpacing
|
||||||
bottomPadding: Config.compactLayout ? Kirigami.Units.mediumSpacing / 2 : Kirigami.Units.largeSpacing
|
bottomPadding: Config.compactLayout ? Kirigami.Units.mediumSpacing / 2 : Kirigami.Units.largeSpacing
|
||||||
leftPadding: Kirigami.Units.smallSpacing
|
leftPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
|
||||||
rightPadding: Config.compactLayout ? Kirigami.Units.largeSpacing : Kirigami.Units.smallSpacing
|
rightPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@@ -182,14 +182,12 @@ QQC2.ItemDelegate {
|
|||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
id: column
|
id: column
|
||||||
spacing: 0
|
spacing: Kirigami.Units.smallSpacing
|
||||||
Item {
|
Item {
|
||||||
id: rowLayout
|
id: rowLayout
|
||||||
visible: model.showAuthor && !isEmote
|
visible: model.showAuthor && !isEmote
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.leftMargin: Config.showAvatarInTimeline ? Kirigami.Units.largeSpacing : 0
|
Layout.preferredWidth: nameLabel.implicitWidth + timeLabel.implicitWidth
|
||||||
Layout.rightMargin: Kirigami.Units.largeSpacing
|
|
||||||
Layout.preferredWidth: nameLabel.implicitWidth + timeLabel.implicitWidth + Kirigami.Units.largeSpacing * 2
|
|
||||||
Layout.maximumWidth: contentMaxWidth
|
Layout.maximumWidth: contentMaxWidth
|
||||||
implicitHeight: visible ? nameLabel.implicitHeight : 0
|
implicitHeight: visible ? nameLabel.implicitHeight : 0
|
||||||
|
|
||||||
@@ -222,7 +220,6 @@ QQC2.ItemDelegate {
|
|||||||
QQC2.Label {
|
QQC2.Label {
|
||||||
id: timeLabel
|
id: timeLabel
|
||||||
leftPadding: Kirigami.Units.largeSpacing
|
leftPadding: Kirigami.Units.largeSpacing
|
||||||
rightPadding: Kirigami.Units.largeSpacing
|
|
||||||
anchors.left: nameLabel.right
|
anchors.left: nameLabel.right
|
||||||
visible: model.showAuthor && !isEmote
|
visible: model.showAuthor && !isEmote
|
||||||
text: visible ? time.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) : ""
|
text: visible ? time.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) : ""
|
||||||
@@ -241,9 +238,6 @@ QQC2.ItemDelegate {
|
|||||||
active: model.reply !== undefined
|
active: model.reply !== undefined
|
||||||
source: 'qrc:imports/NeoChat/Component/Timeline/ReplyComponent.qml'
|
source: 'qrc:imports/NeoChat/Component/Timeline/ReplyComponent.qml'
|
||||||
visible: active
|
visible: active
|
||||||
Layout.topMargin: Kirigami.Units.smallSpacing
|
|
||||||
Layout.bottomMargin: Config.compactLayout ? 0 : Kirigami.Units.smallSpacing
|
|
||||||
Layout.leftMargin: Config.compactLayout ? 0 : Kirigami.Units.largeSpacing
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: replyLoader.item
|
target: replyLoader.item
|
||||||
|
|||||||
Reference in New Issue
Block a user