git.iko.soy/maciek134/podphoenix
on main help sign in
Combined About and Credits page using header sections
commita713fcf1cc1aa3810a6c3e91f72ae271700ed274 authorNekhelesh Ramananthan <krnekhelesh@gmail.com> dateTue 23 Feb 2016, 23:33 (11 years ago) parentfe34f92
4 files changed+142−94
app/settings/About.qml+114−57 app/settings/Credits.qml+8−7 app/ui/SettingsPage.qml−11 po/com.mikeasoft.podbird.pot+20−19
app/settings/About.qml+114−57
@@ -22,76 +22,133 @@ import Ubuntu.Components 1.3
2222Page {
2323 id: aboutPage
2424
25− title: i18n.tr("About")
25+ header: PageHeader {
26+ id: aboutPageHeader
2627
27− Flickable {
28− id: flickable
28+ title: i18n.tr("About")
2929
30− anchors.fill: parent
31− contentHeight: dataColumn.height + units.gu(10) + dataColumn.anchors.topMargin
30+ StyleHints {
31+ backgroundColor: podbird.appTheme.background
32+ }
3233
33− Column {
34− id: dataColumn
34+ extension: Sections {
35+ id: aboutPageHeaderSections
3536
36− spacing: units.gu(3)
3737 anchors {
38− top: parent.top; left: parent.left; right: parent.right; topMargin: units.gu(5)
38+ left: parent.left
39+ leftMargin: units.gu(2)
40+ bottom: parent.bottom
3941 }
4042
41− Image {
42− height: width
43− width: Math.min(parent.width/2, parent.height/2)
44− source: "../graphics/podbird.png"
45− anchors.horizontalCenter: parent.horizontalCenter
43+ StyleHints {
44+ selectedSectionColor: podbird.appTheme.focusText
4645 }
46+ // TRANSTORS: Credits as in the code and design contributors to the app
47+ model: [i18n.tr("About"), i18n.tr("Credits")]
48+ }
49+ }
4750
48− Column {
49− width: parent.width
50− Label {
51− width: parent.width
52− fontSize: "x-large"
53− font.weight: Font.DemiBold
54− horizontalAlignment: Text.AlignHCenter
55− text: "Podbird"
56− }
57− Label {
58− width: parent.width
59− horizontalAlignment: Text.AlignHCenter
60− // TRANSLATORS: Podbird version number e.g Version 0.7
61− text: i18n.tr("Version %1").arg("0.7")
62− }
63− }
6451
65− Column {
66− anchors {
67− left: parent.left
68− right: parent.right
69− margins: units.gu(2)
70− }
71− Label {
72− width: parent.width
73− wrapMode: Text.WordWrap
74− horizontalAlignment: Text.AlignHCenter
75− text: "(C) 2015 Podbird Team"
76− }
77− Label {
78− fontSize: "small"
79− width: parent.width
80− wrapMode: Text.WordWrap
81− horizontalAlignment: Text.AlignHCenter
82− text: i18n.tr("Released under the terms of the GNU GPL v3")
52+ VisualItemModel {
53+ id: tabs
54+
55+ Item {
56+ width: tabView.width
57+ height: tabView.height
58+
59+ Flickable {
60+ id: flickable
61+
62+ anchors.fill: parent
63+ contentHeight: dataColumn.height + units.gu(10) + dataColumn.anchors.topMargin
64+
65+ Column {
66+ id: dataColumn
67+
68+ spacing: units.gu(3)
69+ anchors {
70+ top: parent.top; left: parent.left; right: parent.right; topMargin: units.gu(5)
71+ }
72+
73+ Image {
74+ height: width
75+ width: Math.min(parent.width/2, parent.height/2)
76+ source: "../graphics/podbird.png"
77+ anchors.horizontalCenter: parent.horizontalCenter
78+ }
79+
80+ Column {
81+ width: parent.width
82+ Label {
83+ width: parent.width
84+ fontSize: "x-large"
85+ font.weight: Font.DemiBold
86+ horizontalAlignment: Text.AlignHCenter
87+ text: "Podbird"
88+ }
89+ Label {
90+ width: parent.width
91+ horizontalAlignment: Text.AlignHCenter
92+ // TRANSLATORS: Podbird version number e.g Version 0.7
93+ text: i18n.tr("Version %1").arg("0.7")
94+ }
95+ }
96+
97+ Column {
98+ anchors {
99+ left: parent.left
100+ right: parent.right
101+ margins: units.gu(2)
102+ }
103+ Label {
104+ width: parent.width
105+ wrapMode: Text.WordWrap
106+ horizontalAlignment: Text.AlignHCenter
107+ text: "(C) 2015 Podbird Team"
108+ }
109+ Label {
110+ fontSize: "small"
111+ width: parent.width
112+ wrapMode: Text.WordWrap
113+ horizontalAlignment: Text.AlignHCenter
114+ text: i18n.tr("Released under the terms of the GNU GPL v3")
115+ }
116+ }
117+
118+ Label {
119+ width: parent.width
120+ wrapMode: Text.WordWrap
121+ fontSize: "small"
122+ horizontalAlignment: Text.AlignHCenter
123+ linkColor: podbird.appTheme.linkText
124+ text: i18n.tr("Source code available on %1").arg("<a href=\"https://launchpad.net/podbird\">launchpad.net</a>")
125+ onLinkActivated: Qt.openUrlExternally(link)
126+ }
83127 }
84128 }
129+ }
85130
86− Label {
87− width: parent.width
88− wrapMode: Text.WordWrap
89− fontSize: "small"
90− horizontalAlignment: Text.AlignHCenter
91− linkColor: podbird.appTheme.linkText
92− text: i18n.tr("Source code available on %1").arg("<a href=\"https://launchpad.net/podbird\">launchpad.net</a>")
93− onLinkActivated: Qt.openUrlExternally(link)
94− }
131+ Credits {
132+ width: tabView.width
133+ height: tabView.height
134+ }
135+ }
136+
137+ ListView {
138+ id: tabView
139+ model: tabs
140+ interactive: false
141+
142+ anchors {
143+ top: aboutPageHeader.bottom
144+ left: parent.left
145+ right: parent.right
146+ bottom: parent.bottom
95147 }
148+
149+ orientation: Qt.Horizontal
150+ snapMode: ListView.SnapOneItem
151+ currentIndex: aboutPageHeaderSections.selectedIndex
152+ highlightMoveDuration: UbuntuAnimation.SlowDuration
96153 }
97154}
app/settings/Credits.qml+8−7
@@ -20,20 +20,18 @@ import QtQuick 2.4
2020import Ubuntu.Components 1.3
2121import "../components"
2222
23−Page {
23+Item {
2424 id: creditsPage
2525
26− title: i18n.tr("Credits")
27−
2826 ListModel {
2927 id: creditsModel
3028 Component.onCompleted: initialize()
3129 function initialize() {
3230 // TRANSLATORS: The first argument is the name of creator of Podbird (Michael Sheldon)
33− creditsModel.append({ name: i18n.tr("%1 (Creator)").arg("Michael Sheldon"), title: i18n.tr("Developers") })
34− creditsModel.append({ name: "Nekhelesh Ramananthan", title: i18n.tr("Developers") })
35− creditsModel.append({ name: "Kevin Feyder", title: i18n.tr("Designer") })
36− creditsModel.append({ name: "Ubuntu Translators Community", title: i18n.tr("Translators") })
31+ creditsModel.append({ name: i18n.tr("%1 (Creator)").arg("Michael Sheldon"), title: i18n.tr("Developers"), url: "https://launchpad.net/~michael-sheldon" })
32+ creditsModel.append({ name: "Nekhelesh Ramananthan", title: i18n.tr("Developers"), url: "https://launchpad.net/~nik90" })
33+ creditsModel.append({ name: "Kevin Feyder", title: i18n.tr("Designer"), url: "https://plus.google.com/116231235687734373591" })
34+ creditsModel.append({ name: "Ubuntu Translators Community", title: i18n.tr("Translators"), url: "http://community.ubuntu.com/contribute/translations" })
3735 }
3836 }
3937
@@ -60,8 +58,11 @@ Page {
6058 delegate: ListItem {
6159 ListItemLayout {
6260 title.text: model.name
61+ title.color: podbird.appTheme.baseText
62+ ProgressionSlot {}
6363 }
6464 divider.visible: false
65+ onClicked: Qt.openUrlExternally(model.url)
6566 }
6667 }
6768}
app/ui/SettingsPage.qml−11
@@ -211,17 +211,6 @@ Page {
211211 onClicked: mainStack.push(Qt.resolvedUrl("../settings/About.qml"))
212212 }
213213
214− ListItem {
215− ListItemLayout {
216− // TRANSTORS: Credits as in the code and design contributors to the app
217− title.text: i18n.tr("Credits")
218− title.color: podbird.appTheme.baseText
219− ProgressionSlot {}
220− }
221− divider.visible: false
222− onClicked: mainStack.push(Qt.resolvedUrl("../settings/Credits.qml"))
223− }
224−
225214 ListItem {
226215 ListItemLayout {
227216 title.text: i18n.tr("Report Bug")
po/com.mikeasoft.podbird.pot+20−19
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: \n"
1010"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2016-02-24 01:24+0530\n"
11+"POT-Creation-Date: 2016-02-24 03:58+0530\n"
1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -64,21 +64,26 @@ msgid "%1 min"
6464msgstr ""
6565
6666#. TRANSLATORS: About as in information about the app
67−#: ../app/settings/About.qml:25 ../app/ui/SettingsPage.qml:206
67+#: ../app/settings/About.qml:28 ../app/settings/About.qml:43
68+#: ../app/ui/SettingsPage.qml:206
6869msgid "About"
6970msgstr ""
7071
72+#: ../app/settings/About.qml:43
73+msgid "Credits"
74+msgstr ""
75+
7176#. TRANSLATORS: Podbird version number e.g Version 0.7
72−#: ../app/settings/About.qml:61
77+#: ../app/settings/About.qml:89
7378#, qt-format
7479msgid "Version %1"
7580msgstr ""
7681
77−#: ../app/settings/About.qml:82
82+#: ../app/settings/About.qml:110
7883msgid "Released under the terms of the GNU GPL v3"
7984msgstr ""
8085
81−#: ../app/settings/About.qml:92
86+#: ../app/settings/About.qml:120
8287#, qt-format
8388msgid "Source code available on %1"
8489msgstr ""
@@ -113,25 +118,21 @@ msgid_plural "%1 years"
113118msgstr[0] ""
114119msgstr[1] ""
115120
116−#: ../app/settings/Credits.qml:26 ../app/ui/SettingsPage.qml:217
117−msgid "Credits"
118−msgstr ""
119−
120121#. TRANSLATORS: The first argument is the name of creator of Podbird (Michael Sheldon)
121−#: ../app/settings/Credits.qml:33
122+#: ../app/settings/Credits.qml:31
122123#, qt-format
123124msgid "%1 (Creator)"
124125msgstr ""
125126
126−#: ../app/settings/Credits.qml:33 ../app/settings/Credits.qml:34
127+#: ../app/settings/Credits.qml:31 ../app/settings/Credits.qml:32
127128msgid "Developers"
128129msgstr ""
129130
130−#: ../app/settings/Credits.qml:35
131+#: ../app/settings/Credits.qml:33
131132msgid "Designer"
132133msgstr ""
133134
134−#: ../app/settings/Credits.qml:36
135+#: ../app/settings/Credits.qml:34
135136msgid "Translators"
136137msgstr ""
137138
@@ -176,7 +177,7 @@ msgid "Mark all listened"
176177msgstr ""
177178
178179#: ../app/ui/EpisodesPage.qml:95 ../app/ui/EpisodesPage.qml:189
179−#: ../app/ui/SearchPage.qml:260
180+#: ../app/ui/SearchPage.qml:261
180181msgid "Unsubscribe"
181182msgstr ""
182183
@@ -280,7 +281,7 @@ msgstr ""
280281msgid "No podcasts found matching the search term."
281282msgstr ""
282283
283−#: ../app/ui/PodcastsTab.qml:186 ../app/ui/PodcastsTab.qml:229
284+#: ../app/ui/PodcastsTab.qml:186 ../app/ui/PodcastsTab.qml:230
284285#, qt-format
285286msgid "%1 unheard episode"
286287msgid_plural "%1 unheard episodes"
@@ -326,18 +327,18 @@ msgstr ""
326327
327328#. TRANSLATORS: The first argument here is the date of when the podcast was last updated followed by
328329#. the podcast description.
329−#: ../app/ui/SearchPage.qml:256
330+#: ../app/ui/SearchPage.qml:257
330331#, qt-format
331332msgid ""
332333"Last Updated: %1\n"
333334"%2"
334335msgstr ""
335336
336−#: ../app/ui/SearchPage.qml:260
337+#: ../app/ui/SearchPage.qml:261
337338msgid "Subscribe"
338339msgstr ""
339340
340−#: ../app/ui/SearchPage.qml:331
341+#: ../app/ui/SearchPage.qml:332
341342msgid "Not Available"
342343msgstr ""
343344
@@ -400,7 +401,7 @@ msgstr ""
400401msgid "Misc."
401402msgstr ""
402403
403−#: ../app/ui/SettingsPage.qml:227
404+#: ../app/ui/SettingsPage.qml:216
404405msgid "Report Bug"
405406msgstr ""
406407