Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revamped "about" page
- Changed Text elements to Label (which better follow the system styling).
- Redistributed the elements a bit.
- Licensing detail text is now in a pop-up dialog.
- Added links to Nokia Ovi Store, Twitter, etc.
  • Loading branch information
aperezdc committed May 26, 2012
1 parent 9b8e938 commit 3aac5de
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 41 deletions.
2 changes: 2 additions & 0 deletions cuacfmeego.qrc
Expand Up @@ -9,6 +9,8 @@
<!-- Images -->
<file>cuacfmeego-logo.png</file>
<file>default.png</file>
<file>resources/round-corners-shadow.png</file>
<file>resources/round-corners-shadow-inverse.png</file>

</qresource>
</RCC>
Expand Down
187 changes: 146 additions & 41 deletions qml/AboutPage.qml
Expand Up @@ -8,6 +8,7 @@

import QtQuick 1.1
import com.nokia.meego 1.0
import com.nokia.extras 1.1
import "file:///usr/lib/qt4/imports/com/meego/UIConstants.js" as UIConstants

Page {
Expand All @@ -32,6 +33,43 @@ Page {
}
}

Component.onCompleted: {
aboutOptions.get(0).title = qsTr('Recommend this application')
aboutOptions.get(1).title = qsTr('Tell us what you think')
aboutOptions.get(2).title = qsTr('Rate us in the Nokia Store')
aboutOptions.get(3).title = qsTr('Follow us on Twitter')
aboutOptions.get(4).title = qsTr('Check our other applications')
}

ListModel {
id: aboutOptions
ListElement {
title: 'Recommend this application'
action: 'openExternally'
data: 'mailto:?subject=Download%20Cuac%20FM&body=Available%20at%20http://store.ovi.com/content/273753'
}
ListElement {
title: 'Tell us what you think'
action: 'openExternally'
data: 'mailto:aperez@igalia.com?subject=Cuac%20FM'
}
ListElement {
title: 'Rate us in the Nokia Store'
action: 'openStore'
data: 'http://store.ovi.com/content/273753'
}
ListElement {
title: 'Follow us on Twitter'
action: 'openExternally'
data: 'http://twitter.com/aperezdc'
}
ListElement {
title: 'Check our other applications'
action: 'openStore'
data: 'http://store.nokia.com/publisher/Igalia'
}
}

Flickable {
id: flick
clip: true
Expand All @@ -40,6 +78,7 @@ Page {
topMargin: UIConstants.DEFAULT_MARGIN
leftMargin: UIConstants.DEFAULT_MARGIN
rightMargin: UIConstants.DEFAULT_MARGIN
bottomMargin: UIConstants.DEFAULT_MARGIN
}
contentHeight: contentColumn.height

Expand All @@ -54,39 +93,106 @@ Page {
source: 'qrc:/cuacfmeego-logo.png'
}

Text {
id: aboutVersion
text: 'Cuac FM 0.1.1'
anchors.horizontalCenter: parent.horizontalCenter
font.family: UIConstants.FONT_FAMILY
font.pixelSize: UIConstants.FONT_XLARGE
color: !theme.inverted ?
UIConstants.COLOR_FOREGROUND :
UIConstants.COLOR_INVERTED_FOREGROUND
Label {
id: aboutVersion
text: 'Cuac FM 0.1.1'
width: parent.width
horizontalAlignment: Text.AlignHCenter
platformStyle: LabelStyle {
fontPixelSize: UIConstants.FONT_XLARGE
}
color: !theme.inverted ?
UIConstants.COLOR_FOREGROUND :
UIConstants.COLOR_INVERTED_FOREGROUND
}

Text {
id: aboutCopyright
text: 'Copyright © 2012 Adrian Perez'
anchors.horizontalCenter: parent.horizontalCenter
font.family: UIConstants.FONT_FAMILY
font.pixelSize: UIConstants.FONT_XLARGE
color: !theme.inverted ?
UIConstants.COLOR_FOREGROUND :
UIConstants.COLOR_INVERTED_FOREGROUND
Label {
id: aboutCopyright
text: 'Copyright © 2012 Adrian Perez'
width: parent.width
horizontalAlignment: Text.AlignHCenter
platformStyle: LabelStyle {
fontPixelSize: UIConstants.FONT_LSMALL
fontFamily: UIConstants.FONT_FAMILY_LIGHT
}
color: !theme.inverted ?
UIConstants.COLOR_FOREGROUND :
UIConstants.COLOR_INVERTED_FOREGROUND
}

Text {
id: aboutContact
anchors.horizontalCenter: parent.horizontalCenter
font.family: UIConstants.FONT_FAMILY
font.pixelSize: UIConstants.FONT_LSMALL
color: !theme.inverted ?
UIConstants.COLOR_FOREGROUND :
UIConstants.COLOR_INVERTED_FOREGROUND
text: '<a href="mailto:aperez@igalia.com">aperez@igalia.com</a>'
onLinkActivated: Qt.openUrlExternally(link)
}
Rectangle {
width: parent.width
height: repeater.model.count * UIConstants.LIST_ITEM_HEIGHT_SMALL
color: !theme.inverted ?
UIConstants.COLOR_BACKGROUND :
UIConstants.COLOR_INVERTED_BACKGROUND

Column {
id: subcolumn
anchors.fill: parent
Repeater {
id: repeater
model: aboutOptions
Item {
height: UIConstants.LIST_ITEM_HEIGHT_SMALL
width: parent.width
BorderImage {
anchors.fill: parent
visible: mouseArea.pressed
source: 'image://theme/meegotouch-list-fullwidth-background-pressed-vertical-center'
}
Label {
text: model.title
anchors {
left: parent.left
leftMargin: UIConstants.DEFAULT_MARGIN
verticalCenter: parent.verticalCenter
}
platformStyle: LabelStyle {
fontPixelSize: UIConstants.FONT_SLARGE
}
color: !theme.inverted ?
UIConstants.COLOR_FOREGROUND :
UIConstants.COLOR_INVERTED_FOREGROUND
}
MoreIndicator {
anchors {
right: parent.right
rightMargin: UIConstants.DEFAULT_MARGIN
verticalCenter: parent.verticalCenter
}
}
Rectangle {
anchors.bottom: parent.bottom
width: parent.width
height: 1
color: UIConstants.COLOR_BUTTON_DISABLED_FOREGROUND
visible: index !== repeater.model.count - 1
}
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: {
if (model.action === 'openStore') {
controller.openStoreClient(model.data)
} else if (model.action === 'openExternally') {
Qt.openUrlExternally(model.data)
}
}
}
}
}
}

BorderImage {
id: border
source: !theme.inverted ?
'qrc:/resources/round-corners-shadow.png' :
'qrc:/resources/round-corners-shadow-inverse.png'
anchors.fill: parent
border { left: 18; top: 18; right: 18; bottom: 18 }
}
}

Text {
id: aboutContentDisclaimer
Expand All @@ -101,21 +207,20 @@ Page {
onLinkActivated: Qt.openUrlExternally(link)
}

Text {
id: aboutLicense
font.pixelSize: UIConstants.FONT_LSMALL
color: !theme.inverted ?
UIConstants.COLOR_FOREGROUND :
UIConstants.COLOR_INVERTED_FOREGROUND
width: parent.width
wrapMode: Text.WordWrap
font.family: "Nokia Pure Text Light"
text: license
onLinkActivated: Qt.openUrlExternally(link)
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr('Licensing terms')
onClicked: licenseDialog.open()
}
}
}

QueryDialog {
id: licenseDialog
message: license
acceptButtonText: qsTr('Dismiss')
}

ScrollDecorator {
flickableItem: flick
anchors.rightMargin: -UIConstants.DEFAULT_MARGIN
Expand Down
Binary file added resources/round-corners-shadow-inverse.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/round-corners-shadow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3aac5de

Please sign in to comment.