Skip to content

Commit

Permalink
Added About page
Browse files Browse the repository at this point in the history
Use PageStack navigation
Added licensing information
Added opaque background to app icon
Update README
  • Loading branch information
Arc676 committed Apr 8, 2019
1 parent e27ddad commit 7d3426e
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 44 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ Randomly answers yes/no questions

QML version of [Crystal Ball for Mac](https://github.com/Arc676/Crystal-Ball) built using Clickable. Project objective is for the app to be usable on UBports Ubuntu Touch as well as desktop Ubuntu. The README in the Mac version's repository has more info.

# Licensing

Project available under GPLv3.

Application icon by [Freepik](www.freepik.com) from [flaticon.com](www.flaticon.com) available under CC BY 3.0. Opaque background added by Arc676/Alessandro Vinciguerra.
Binary file modified assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion crystalball.desktop.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
_Name=Crystal Ball
Exec=qmlscene qml/Main.qml
Exec=qmlscene qml/Loader.qml
Icon=assets/logo.png
Terminal=false
Type=Application
Expand Down
84 changes: 60 additions & 24 deletions po/crystalball.arc676.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: crystalball.arc676\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-08 16:51+0000\n"
"POT-Creation-Date: 2019-04-08 17:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -17,74 +17,110 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../qml/Main.qml:34
#: ../qml/AboutView.qml:40
msgid "written by Arc676/Alessandro Vinciguerra. Project available under"
msgstr ""

#: ../qml/AboutView.qml:44
msgid ""
"This program is free software: you can redistribute it and/or modify it "
"under the terms of the GNU General Public License as published by the Free "
"Software Foundation (version 3)."
msgstr ""

#: ../qml/AboutView.qml:48
msgid ""
"This program is distributed in the hope that it will be useful, but WITHOUT "
"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
"more details."
msgstr ""

#: ../qml/AboutView.qml:52
msgid ""
"For the full license text, visit the <a href='https://github.com/Arc676/"
"Farkle-Linux'>repository</a> or the <a href='http://www.gnu.org/"
"licenses/'>GNU licenses page</a>"
msgstr ""

#: ../qml/AboutView.qml:56
msgid "%1 assets"
msgstr ""

#: ../qml/AboutView.qml:61
msgid ""
"Application icon by <a href='http://www.freepik.com'>Freepik</a> from <a "
"href='http://www.flaticon.com'>flaticon.com</a>"
msgstr ""

#: ../qml/DefaultHeader.qml:20 ../qml/Main.qml:63 crystalball.desktop.in.h:1
msgid "Crystal Ball"
msgstr ""

#: ../qml/DefaultHeader.qml:27 ../qml/Main.qml:162
msgid "About Crystal Ball"
msgstr ""

#: ../qml/Main.qml:32
msgid "Yes"
msgstr ""

#: ../qml/Main.qml:36
#: ../qml/Main.qml:34
msgid "No"
msgstr ""

#: ../qml/Main.qml:38
#: ../qml/Main.qml:36
msgid "Maybe"
msgstr ""

#: ../qml/Main.qml:40
#: ../qml/Main.qml:38
msgid "Try asking again later"
msgstr ""

#: ../qml/Main.qml:42
#: ../qml/Main.qml:40
msgid "Definitely"
msgstr ""

#: ../qml/Main.qml:44
#: ../qml/Main.qml:42
msgid "Of course not"
msgstr ""

#: ../qml/Main.qml:46
#: ../qml/Main.qml:44
msgid "Sure"
msgstr ""

#: ../qml/Main.qml:48
#: ../qml/Main.qml:46
msgid "Nope"
msgstr ""

#: ../qml/Main.qml:50
#: ../qml/Main.qml:48
msgid "Why not?"
msgstr ""

#: ../qml/Main.qml:52
#: ../qml/Main.qml:50
msgid "I wouldn't bet on it"
msgstr ""

#: ../qml/Main.qml:54
#: ../qml/Main.qml:52
msgid "You bet!"
msgstr ""

#: ../qml/Main.qml:56
#: ../qml/Main.qml:54
msgid "Don't hold your breath"
msgstr ""

#: ../qml/Main.qml:65 crystalball.desktop.in.h:1
msgid "Crystal Ball"
msgstr ""

#: ../qml/Main.qml:76
#: ../qml/Main.qml:74
msgid "Enter yes/no question"
msgstr ""

#: ../qml/Main.qml:99
msgid "Ask question"
msgstr ""

#: ../qml/Main.qml:125 ../qml/Main.qml:147
#: ../qml/Main.qml:125 ../qml/Main.qml:148
msgid "Crystal Ball Transcript"
msgstr ""

#: ../qml/Main.qml:145
#: ../qml/Main.qml:146
msgid "Clear Transcript"
msgstr ""

#: ../qml/Main.qml:160
msgid "About Crystal Ball"
msgstr ""
65 changes: 65 additions & 0 deletions qml/AboutView.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
//Copyright (C) 2019 Arc676/Alessandro Vinciguerra <[email protected]>

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation (version 3)

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program. If not, see <http://www.gnu.org/licenses/>.

import QtQuick 2.4
import QtQuick.Layouts 1.1
import Ubuntu.Components 1.3

Page {
id: aboutPage
header: DefaultHeader {}

ScrollView {
id: scroll
anchors {
top: header.bottom
topMargin: margin
left: parent.left
leftMargin: margin
right: parent.right
rightMargin: margin
bottom: parent.bottom
}

Column {
width: scroll.width
spacing: margin

WrappingLabel {
text: "Crystal Ball - " +i18n.tr("written by Arc676/Alessandro Vinciguerra. Project available under") + " GPLv3. Copyright 2018-9 Arc676/Alessandro Vinciguerra <[email protected]>"
}

WrappingLabel {
text: i18n.tr("This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (version 3).")
}

WrappingLabel {
text: i18n.tr("This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.")
}

WrappingLabel {
text: i18n.tr("For the full license text, visit the <a href='https://github.com/Arc676/Crystal-Ball-Clickable'>repository</a> or the <a href='http://www.gnu.org/licenses/'>GNU licenses page</a>")
}

WrappingLabel {
text: i18n.tr("%1 assets").arg("<a href='http://creativecommons.org/licenses/by/3.0/'>CC BY 3.0</a>")
textSize: Label.Large
}

WrappingLabel {
text: i18n.tr("Application icon by <a href='http://www.freepik.com'>Freepik</a> from <a href='http://www.flaticon.com'>flaticon.com</a>")
}
}
}
}
33 changes: 33 additions & 0 deletions qml/DefaultHeader.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (C) 2019 Arc676/Alessandro Vinciguerra <[email protected]>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation (version 3)

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import QtQuick 2.4
import Ubuntu.Components 1.3

PageHeader {
id: header
title: i18n.tr("Crystal Ball")

trailingActionBar {
actions: [
Action {
iconName: "info"
visible: pageViewer.depth === 1
text: i18n.tr("About Crystal Ball")

onTriggered: pageViewer.push(pageViewer.aboutPage)
}
]
}
}
46 changes: 46 additions & 0 deletions qml/Loader.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//Copyright (C) 2018-9 Arc676/Alessandro Vinciguerra <[email protected]>

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation (version 3)

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program. If not, see <http://www.gnu.org/licenses/>.

import QtQuick 2.4
import QtQuick.Layouts 1.1
import Ubuntu.Components 1.3

MainView {
id: root
objectName: 'mainView'
applicationName: 'crystalball.arc676'
automaticOrientation: true

width: units.gu(45)
height: units.gu(75)
property real margin: units.gu(2)

PageStack {
id: pageViewer
anchors.fill: parent

property Main mainPage: Main {
visible: false
}

property AboutView aboutPage: AboutView {
visible: false
}

Component.onCompleted: {
pageViewer.clear()
pageViewer.push(mainPage)
}
}
}
23 changes: 4 additions & 19 deletions qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ import QtQuick 2.4
import QtQuick.Layouts 1.1
import Ubuntu.Components 1.3

MainView {
id: root
objectName: 'mainView'
applicationName: 'crystalball.arc676'
automaticOrientation: true
Page {
id: mainView
header: DefaultHeader {}

width: units.gu(45)
height: units.gu(75)
Expand Down Expand Up @@ -138,7 +136,7 @@ MainView {
Button {
id: clearButton
anchors {
bottom: aboutButton.top
bottom: parent.bottom
bottomMargin: margin
leftMargin: margin
rightMargin: margin
Expand All @@ -150,18 +148,5 @@ MainView {
transcript.text = i18n.tr('Crystal Ball Transcript')
}
}

Button {
id: aboutButton
anchors {
bottom: parent.bottom
bottomMargin: margin
leftMargin: margin
rightMargin: margin
horizontalCenter: parent.horizontalCenter
}
width: parent.width - 2 * margin
text: i18n.tr('About Crystal Ball')
}
}
}
27 changes: 27 additions & 0 deletions qml/WrappingLabel.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//Copyright (C) 2019 Arc676/Alessandro Vinciguerra <[email protected]>

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation (version 3)

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program. If not, see <http://www.gnu.org/licenses/>.

import QtQuick 2.4
import Ubuntu.Components 1.3

Label {
anchors {
left: parent.left
leftMargin: margin
right: parent.right
rightMargin: margin
}
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
onLinkActivated: Qt.openUrlExternally(link)
}

0 comments on commit 7d3426e

Please sign in to comment.