Primitive timeline background support.
This commit is contained in:
@@ -299,46 +299,6 @@ Dialog {
|
||||
onPrimaryClicked: fontFamilyDialog.createObject(ApplicationWindow.overlay).open()
|
||||
}
|
||||
}
|
||||
|
||||
Control {
|
||||
width: parent.width
|
||||
|
||||
contentItem: RowLayout {
|
||||
MaterialIcon {
|
||||
Layout.preferredWidth: 48
|
||||
Layout.preferredHeight: 48
|
||||
|
||||
color: MPalette.foreground
|
||||
icon: "\ue8aa"
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
|
||||
color: MPalette.foreground
|
||||
text: "Chat Background"
|
||||
}
|
||||
}
|
||||
|
||||
RippleEffect {
|
||||
anchors.fill: parent
|
||||
|
||||
onPrimaryClicked: {
|
||||
var fileDialog = chatBackgroundDialog.createObject(ApplicationWindow.overlay)
|
||||
|
||||
fileDialog.chosen.connect(function(path) {
|
||||
if (!path) return
|
||||
|
||||
MSettings.timelineBackground = path
|
||||
})
|
||||
fileDialog.rejected.connect(function(path) {
|
||||
MSettings.timelineBackground = ""
|
||||
})
|
||||
|
||||
fileDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onClosed: destroy()
|
||||
|
||||
@@ -211,6 +211,48 @@ Dialog {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MenuSeparator {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
|
||||
flat: true
|
||||
text: "Set background image"
|
||||
|
||||
onClicked: {
|
||||
var fileDialog = chatBackgroundDialog.createObject(ApplicationWindow.overlay)
|
||||
|
||||
fileDialog.chosen.connect(function(path) {
|
||||
if (!path) return
|
||||
|
||||
room.setBackgroundFromLocalFile(path)
|
||||
})
|
||||
|
||||
fileDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
|
||||
flat: true
|
||||
text: "Clear background image"
|
||||
|
||||
onClicked: room.clearBackground()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: chatBackgroundDialog
|
||||
|
||||
OpenFileDialog {}
|
||||
}
|
||||
|
||||
onClosed: destroy()
|
||||
|
||||
Reference in New Issue
Block a user