Cleanup leftover issues from moving ReplyComponent away from GridLayout
Cleanup leftover issues from moving ReplyComponent away from GridLayout. - Remove leftover GridLayout properties or references to them or convert as required - Remove unneeded Item wrapper
This commit is contained in:
@@ -20,7 +20,7 @@ import org.kde.neochat
|
||||
* show in their original form and are instead visualised with a MIME type delegate
|
||||
* e.g. Videos.
|
||||
*/
|
||||
Item {
|
||||
RowLayout {
|
||||
id: root
|
||||
|
||||
/**
|
||||
@@ -75,19 +75,11 @@ Item {
|
||||
*/
|
||||
signal replyClicked()
|
||||
|
||||
implicitWidth: mainLayout.implicitWidth
|
||||
implicitHeight: mainLayout.implicitHeight
|
||||
|
||||
RowLayout {
|
||||
id: mainLayout
|
||||
anchors.fill: parent
|
||||
spacing: Kirigami.Units.largeSpacing
|
||||
|
||||
Rectangle {
|
||||
id: verticalBorder
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.rowSpan: 2
|
||||
|
||||
implicitWidth: Kirigami.Units.smallSpacing
|
||||
color: root.author.color
|
||||
@@ -151,7 +143,6 @@ Item {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onTapped: root.replyClicked()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: textComponent
|
||||
@@ -176,13 +167,13 @@ Item {
|
||||
width: mediaSizeHelper.currentSize.width
|
||||
height: mediaSizeHelper.currentSize.height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: root.mediaInfo.source
|
||||
source: root?.mediaInfo.source ?? ""
|
||||
|
||||
MediaSizeHelper {
|
||||
id: mediaSizeHelper
|
||||
contentMaxWidth: root.contentMaxWidth - verticalBorder.width - mainLayout.columnSpacing
|
||||
mediaWidth: root.mediaInfo.width
|
||||
mediaHeight: root.mediaInfo.height
|
||||
contentMaxWidth: root.contentMaxWidth - verticalBorder.width - root.spacing
|
||||
mediaWidth: root?.mediaInfo.width ?? -1
|
||||
mediaHeight: root?.mediaInfo.height ?? -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user