Move upload button to align chatbar to room text
This commit is contained in:
@@ -311,10 +311,49 @@ ToolBar {
|
|||||||
onClicked: clearEditReply()
|
onClicked: clearEditReply()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 2 + Kirigami.Units.smallSpacing + Kirigami.Units.largeSpacing
|
||||||
|
|
||||||
|
ToolButton {
|
||||||
|
id: uploadButton
|
||||||
|
|
||||||
|
visible: !isReply && !hasAttachment
|
||||||
|
|
||||||
|
icon.name: "mail-attachment"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
if (Clipboard.hasImage) {
|
||||||
|
attachDialog.open()
|
||||||
|
} else {
|
||||||
|
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay)
|
||||||
|
|
||||||
|
fileDialog.chosen.connect(function(path) {
|
||||||
|
if (!path) return
|
||||||
|
|
||||||
|
root.attach(path)
|
||||||
|
})
|
||||||
|
|
||||||
|
fileDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolTip {
|
||||||
|
text: i18n("Attach an image or file")
|
||||||
|
}
|
||||||
|
|
||||||
|
BusyIndicator {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
running: currentRoom && currentRoom.hasFileUploading
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: inputField.lineHeight * 8
|
Layout.maximumHeight: inputField.lineHeight * 8
|
||||||
|
|
||||||
TextArea {
|
TextArea {
|
||||||
id: inputField
|
id: inputField
|
||||||
property real progress: 0
|
property real progress: 0
|
||||||
@@ -522,7 +561,6 @@ ToolBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
id: emojiButton
|
id: emojiButton
|
||||||
icon.name: "preferences-desktop-emoticons"
|
icon.name: "preferences-desktop-emoticons"
|
||||||
@@ -537,40 +575,6 @@ ToolBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
|
||||||
id: uploadButton
|
|
||||||
|
|
||||||
visible: !isReply && !hasAttachment
|
|
||||||
|
|
||||||
icon.name: "mail-attachment"
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
if (Clipboard.hasImage) {
|
|
||||||
attachDialog.open()
|
|
||||||
} else {
|
|
||||||
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay)
|
|
||||||
|
|
||||||
fileDialog.chosen.connect(function(path) {
|
|
||||||
if (!path) return
|
|
||||||
|
|
||||||
root.attach(path)
|
|
||||||
})
|
|
||||||
|
|
||||||
fileDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolTip {
|
|
||||||
text: i18n("Attach an image or file")
|
|
||||||
}
|
|
||||||
|
|
||||||
BusyIndicator {
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
running: currentRoom && currentRoom.hasFileUploading
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
icon.name: "document-send"
|
icon.name: "document-send"
|
||||||
icon.color: "transparent"
|
icon.color: "transparent"
|
||||||
|
|||||||
Reference in New Issue
Block a user