From abfd408227d021954d0b09930a3c1e586c4d8ef8 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Tue, 1 Dec 2020 05:31:38 +0200 Subject: [PATCH] Allow any orientation for pickers --- qml/pages/ChatPage.qml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml index b078755..b608730 100644 --- a/qml/pages/ChatPage.qml +++ b/qml/pages/ChatPage.qml @@ -1083,7 +1083,9 @@ Page { visible: chatPage.hasSendPrivilege("can_send_media_messages") icon.source: "image://theme/icon-m-image" onClicked: { - var picker = pageStack.push("Sailfish.Pickers.ImagePickerPage"); + var picker = pageStack.push("Sailfish.Pickers.ImagePickerPage", { + allowedOrientations: chatPage.allowedOrientations + }) picker.selectedContentPropertiesChanged.connect(function(){ attachmentOptionsRow.isNeeded = false; Debug.log("Selected document: ", picker.selectedContentProperties.filePath ); @@ -1098,7 +1100,9 @@ Page { visible: chatPage.hasSendPrivilege("can_send_media_messages") icon.source: "image://theme/icon-m-video" onClicked: { - var picker = pageStack.push("Sailfish.Pickers.VideoPickerPage"); + var picker = pageStack.push("Sailfish.Pickers.VideoPickerPage", { + allowedOrientations: chatPage.allowedOrientations + }) picker.selectedContentPropertiesChanged.connect(function(){ attachmentOptionsRow.isNeeded = false; Debug.log("Selected video: ", picker.selectedContentProperties.filePath ); @@ -1113,7 +1117,9 @@ Page { visible: chatPage.hasSendPrivilege("can_send_media_messages") icon.source: "image://theme/icon-m-document" onClicked: { - var picker = pageStack.push("Sailfish.Pickers.FilePickerPage"); + var picker = pageStack.push("Sailfish.Pickers.FilePickerPage", { + allowedOrientations: chatPage.allowedOrientations + }) picker.selectedContentPropertiesChanged.connect(function(){ attachmentOptionsRow.isNeeded = false; Debug.log("Selected document: ", picker.selectedContentProperties.filePath );