|
| 1 | +/* |
| 2 | + * Copyright (C) 2013 Lucien XU <[email protected]> |
| 3 | + * |
| 4 | + * You may use this file under the terms of the BSD license as follows: |
| 5 | + * |
| 6 | + * "Redistribution and use in source and binary forms, with or without |
| 7 | + * modification, are permitted provided that the following conditions are |
| 8 | + * met: |
| 9 | + * * Redistributions of source code must retain the above copyright |
| 10 | + * notice, this list of conditions and the following disclaimer. |
| 11 | + * * Redistributions in binary form must reproduce the above copyright |
| 12 | + * notice, this list of conditions and the following disclaimer in |
| 13 | + * the documentation and/or other materials provided with the |
| 14 | + * distribution. |
| 15 | + * * The names of its contributors may not be used to endorse or promote |
| 16 | + * products derived from this software without specific prior written |
| 17 | + * permission. |
| 18 | + * |
| 19 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 20 | + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 21 | + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 22 | + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 23 | + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 24 | + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 25 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 | + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 | + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 | + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
| 30 | + */ |
| 31 | + |
| 32 | +import QtQuick 2.0 |
| 33 | +import Sailfish.Silica 1.0 |
| 34 | +import harbour.twablet 1.0 |
| 35 | + |
| 36 | +Page { |
| 37 | + id: container |
| 38 | + property RightPanel rightPanel |
| 39 | + allowedOrientations: app.defaultAllowedOrientations |
| 40 | + |
| 41 | + SilicaFlickable { |
| 42 | + anchors.fill: parent |
| 43 | + contentHeight: mainColumn.height + Theme.paddingLarge + buttonsColumn.height |
| 44 | + Column { |
| 45 | + id: mainColumn |
| 46 | + spacing: Theme.paddingMedium |
| 47 | + anchors.left: parent.left; anchors.right: parent.right |
| 48 | + PageHeader { |
| 49 | + title: qsTr("About") |
| 50 | + } |
| 51 | + |
| 52 | + Image { |
| 53 | + anchors.horizontalCenter: parent.horizontalCenter |
| 54 | + source: "../../data/logo.png" |
| 55 | + } |
| 56 | + |
| 57 | + Column { |
| 58 | + anchors.left: parent.left; anchors.leftMargin: Theme.horizontalPageMargin |
| 59 | + anchors.right: parent.right; anchors.rightMargin: Theme.horizontalPageMargin |
| 60 | + spacing: Theme.paddingSmall |
| 61 | + |
| 62 | + Label { |
| 63 | + anchors.horizontalCenter: parent.horizontalCenter |
| 64 | + color: Theme.highlightColor |
| 65 | + font.pixelSize: Theme.fontSizeHuge |
| 66 | + text: qsTr("Twablet") |
| 67 | + } |
| 68 | + |
| 69 | + Label { |
| 70 | + anchors.horizontalCenter: parent.horizontalCenter |
| 71 | + font.pixelSize: Theme.fontSizeExtraSmall |
| 72 | + color: Theme.highlightColor |
| 73 | + wrapMode: Text.WordWrap |
| 74 | + text: qsTr("By Lucien Xu") |
| 75 | + } |
| 76 | + |
| 77 | + Label { |
| 78 | + anchors.horizontalCenter: parent.horizontalCenter |
| 79 | + font.pixelSize: Theme.fontSizeExtraSmall |
| 80 | + color: Theme.secondaryHighlightColor |
| 81 | + wrapMode: Text.WordWrap |
| 82 | + text: qsTr("Version %1").arg(Info.version) |
| 83 | + } |
| 84 | + } |
| 85 | + |
| 86 | + Label { |
| 87 | + wrapMode: Text.WordWrap |
| 88 | + anchors.left: parent.left; anchors.leftMargin: Theme.horizontalPageMargin |
| 89 | + anchors.right: parent.right; anchors.rightMargin: Theme.horizontalPageMargin |
| 90 | + font.pixelSize: Theme.fontSizeSmall |
| 91 | + text: qsTr("Twablet is a Twitter client designed for bigger screens. It is an Open Source software, meaning that it can be modified and enhanced by anybody. If you like Friends, please consider a donation. It will help improving the software, while keeping it free and Open Source.") |
| 92 | + } |
| 93 | + } |
| 94 | + |
| 95 | + Column { |
| 96 | + id: buttonsColumn |
| 97 | + anchors.top: mainColumn.bottom; anchors.topMargin: Theme.paddingLarge |
| 98 | + anchors.left: parent.left; anchors.right: parent.right |
| 99 | + MiniButton { |
| 100 | + anchors.left: parent.left; anchors.right: parent.right |
| 101 | + text: qsTr("Donate via Paypal") |
| 102 | + onClicked: Qt.openUrlExternally(Info.paypal) |
| 103 | + } |
| 104 | + MiniButton { |
| 105 | + anchors.left: parent.left; anchors.right: parent.right |
| 106 | + text: qsTr("Flattr me") |
| 107 | + onClicked: Qt.openUrlExternally(Info.flattr) |
| 108 | + } |
| 109 | + MiniButton { |
| 110 | + AccountSelectionModel { |
| 111 | + id: accountSelectionModel |
| 112 | + repository: Repository |
| 113 | + Component.onCompleted: { |
| 114 | + accountSelectionModel.index = 0 |
| 115 | + } |
| 116 | + } |
| 117 | + |
| 118 | + anchors.left: parent.left; anchors.right: parent.right |
| 119 | + text: qsTr("Follow me on Twitter") |
| 120 | + onClicked: { |
| 121 | + pageStack.pop() |
| 122 | + container.rightPanel.openUser("361931860", accountSelectionModel.selection, false) |
| 123 | + } |
| 124 | + } |
| 125 | + } |
| 126 | + |
| 127 | + VerticalScrollDecorator {} |
| 128 | + } |
| 129 | +} |
0 commit comments