Allow uploading additional stickers
This commit is contained in:
parent
a57a15a2e0
commit
16d0190f4e
4 changed files with 97 additions and 5 deletions
|
|
@ -23,6 +23,9 @@ MouseArea {
|
|||
// console.warn("Delta: ", wheel.pixelDelta.y);
|
||||
// console.warn("Old position: ", flickable.contentY);
|
||||
// console.warn("New position: ", newPos);
|
||||
// breaks ListView's with headers...
|
||||
//if (typeof (flickableItem.headerItem) !== "undefined" && flickableItem.headerItem)
|
||||
// minYExtent += flickableItem.headerItem.height;
|
||||
|
||||
id: root
|
||||
|
||||
|
|
@ -30,10 +33,6 @@ MouseArea {
|
|||
property alias enabled: root.enabled
|
||||
|
||||
function calculateNewPosition(flickableItem, wheel) {
|
||||
// breaks ListView's with headers...
|
||||
//if (typeof (flickableItem.headerItem) !== "undefined" && flickableItem.headerItem)
|
||||
// minYExtent += flickableItem.headerItem.height;
|
||||
|
||||
//Nothing to scroll
|
||||
if (flickableItem.contentHeight < flickableItem.height)
|
||||
return flickableItem.contentY;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import ".."
|
||||
import "../components"
|
||||
import Qt.labs.platform 1.1
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
|
|
@ -78,6 +79,23 @@ ApplicationWindow {
|
|||
|
||||
}
|
||||
|
||||
footer: Button {
|
||||
palette: Nheko.colors
|
||||
onClicked: addFilesDialog.open()
|
||||
width: ListView.view.width
|
||||
text: qsTr("Add images")
|
||||
|
||||
FileDialog {
|
||||
id: addFilesDialog
|
||||
|
||||
folder: StandardPaths.writableLocation(StandardPaths.PicturesLocation)
|
||||
fileMode: FileDialog.OpenFiles
|
||||
nameFilters: [qsTr("Stickers (*.png *.webp)")]
|
||||
onAccepted: imagePack.addStickers(files)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delegate: AvatarListTile {
|
||||
id: packItem
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue