Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[qrshare] Compatibility with out-of-process sharing
- Loading branch information
Showing
9 changed files
with
135 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import QtQuick 2.0 | ||
| import Sailfish.Silica 1.0 | ||
|
|
||
| Item { | ||
| property var shareAction | ||
|
|
||
| width: parent.width | ||
| height: isLandscape ? (Screen.width - Theme.itemSizeLarge - 2 * Theme.paddingLarge) : Screen.width | ||
|
|
||
| property Item orientationComponent | ||
| readonly property int orientation: orientationComponent ? orientationComponent.orientation : Orientation.None | ||
| readonly property bool isLandscape: (orientation === Orientation.Landscape || orientation === Orientation.LandscapeInverted) | ||
|
|
||
| onIsLandscapeChanged: console.log(isLandscape, height) | ||
|
|
||
| Component.onCompleted: { | ||
| var parentItem = parent | ||
| while (parentItem) { | ||
| if ('orientation' in parentItem) { | ||
| orientationComponent = parentItem | ||
| break | ||
| } | ||
| parentItem = parentItem.parent | ||
| } | ||
| } | ||
|
|
||
| QRShare { | ||
| anchors.fill: parent | ||
| content: (shareAction && 'resources' in shareAction && shareAction.resources.length > 0) ? shareAction.resources[0] : undefined | ||
| menuWidth: width - 2 * Theme.itemSizeSmall - 4 * Theme.paddingMedium | ||
| hideInactiveMenu: true | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import QtQuick 2.0 | ||
| import Sailfish.Silica 1.0 | ||
|
|
||
| Page { | ||
| property url source | ||
| property alias content: qrShare.content | ||
| property string methodId | ||
| property string displayName | ||
| property int accountId | ||
| property string accountName | ||
| property var shareEndDestination | ||
|
|
||
| PageHeader { id: header } | ||
|
|
||
| QRShare { | ||
| id: qrShare | ||
|
|
||
| anchors.fill: parent | ||
| verticalMargins: header.height | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters