Merge pull request #214 from monich/pickers
Allow any orientation for pickers
This commit is contained in:
commit
921bf92245
1 changed files with 9 additions and 3 deletions
|
@ -1083,7 +1083,9 @@ Page {
|
||||||
visible: chatPage.hasSendPrivilege("can_send_media_messages")
|
visible: chatPage.hasSendPrivilege("can_send_media_messages")
|
||||||
icon.source: "image://theme/icon-m-image"
|
icon.source: "image://theme/icon-m-image"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var picker = pageStack.push("Sailfish.Pickers.ImagePickerPage");
|
var picker = pageStack.push("Sailfish.Pickers.ImagePickerPage", {
|
||||||
|
allowedOrientations: chatPage.allowedOrientations
|
||||||
|
})
|
||||||
picker.selectedContentPropertiesChanged.connect(function(){
|
picker.selectedContentPropertiesChanged.connect(function(){
|
||||||
attachmentOptionsRow.isNeeded = false;
|
attachmentOptionsRow.isNeeded = false;
|
||||||
Debug.log("Selected document: ", picker.selectedContentProperties.filePath );
|
Debug.log("Selected document: ", picker.selectedContentProperties.filePath );
|
||||||
|
@ -1098,7 +1100,9 @@ Page {
|
||||||
visible: chatPage.hasSendPrivilege("can_send_media_messages")
|
visible: chatPage.hasSendPrivilege("can_send_media_messages")
|
||||||
icon.source: "image://theme/icon-m-video"
|
icon.source: "image://theme/icon-m-video"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var picker = pageStack.push("Sailfish.Pickers.VideoPickerPage");
|
var picker = pageStack.push("Sailfish.Pickers.VideoPickerPage", {
|
||||||
|
allowedOrientations: chatPage.allowedOrientations
|
||||||
|
})
|
||||||
picker.selectedContentPropertiesChanged.connect(function(){
|
picker.selectedContentPropertiesChanged.connect(function(){
|
||||||
attachmentOptionsRow.isNeeded = false;
|
attachmentOptionsRow.isNeeded = false;
|
||||||
Debug.log("Selected video: ", picker.selectedContentProperties.filePath );
|
Debug.log("Selected video: ", picker.selectedContentProperties.filePath );
|
||||||
|
@ -1113,7 +1117,9 @@ Page {
|
||||||
visible: chatPage.hasSendPrivilege("can_send_media_messages")
|
visible: chatPage.hasSendPrivilege("can_send_media_messages")
|
||||||
icon.source: "image://theme/icon-m-document"
|
icon.source: "image://theme/icon-m-document"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var picker = pageStack.push("Sailfish.Pickers.FilePickerPage");
|
var picker = pageStack.push("Sailfish.Pickers.FilePickerPage", {
|
||||||
|
allowedOrientations: chatPage.allowedOrientations
|
||||||
|
})
|
||||||
picker.selectedContentPropertiesChanged.connect(function(){
|
picker.selectedContentPropertiesChanged.connect(function(){
|
||||||
attachmentOptionsRow.isNeeded = false;
|
attachmentOptionsRow.isNeeded = false;
|
||||||
Debug.log("Selected document: ", picker.selectedContentProperties.filePath );
|
Debug.log("Selected document: ", picker.selectedContentProperties.filePath );
|
||||||
|
|
Loading…
Reference in a new issue