Commit e5d160b8 authored by Johnny Jazeix's avatar Johnny Jazeix
Browse files

Add GCText to handle fonts, add a settings to change current font, change all Text items to GCText

parent 1ca6578b
......@@ -18,6 +18,8 @@
import QtQuick 2.1
import QtGraphicalEffects 1.0
import "../../core"
Item {
width: text.width
......@@ -25,7 +27,7 @@ Item {
property alias text: text.text
Text {
GCText {
id: text
font.pointSize: 32
font.bold: true
......
......@@ -180,7 +180,7 @@ ActivityBase {
left: bar.right
}
Text {
GCText {
id: player1_score
anchors.verticalCenter: parent.verticalCenter
x: parent.width / 2 + 5
......@@ -200,7 +200,7 @@ ActivityBase {
leftMargin: 10 * ApplicationInfo.ratio
}
Text {
GCText {
id: player2_score
anchors.verticalCenter: parent.verticalCenter
color: "white"
......
......@@ -209,7 +209,7 @@ ActivityBase {
}
// Instructions
Text {
GCText {
id: instructions
text: ApplicationInfo.isMobile ?
qsTr("Tap both hands at the same time,
......
......@@ -52,7 +52,7 @@ Image {
}
Text {
GCText {
id: text
anchors.horizontalCenter: isCarriage ?
carriageBg.horizontalCenter :
......
......@@ -142,7 +142,7 @@ ActivityBase {
radius: 10
}
Text {
GCText {
id: questionText
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
......
......@@ -82,7 +82,7 @@ ActivityBase {
}
/* Target text */
Text {
GCText {
text: qsTr("Set the watch to:") + " " +
Activity.get2CharValue(
items.targetH) + ":" + Activity.get2CharValue(
......@@ -139,7 +139,7 @@ ActivityBase {
/* The minutes */
Repeater {
model: 60
Text {
GCText {
text: index + 1
font {
pixelSize: Math.max(
......@@ -188,7 +188,7 @@ ActivityBase {
/* The hours */
Repeater {
model: 12
Text {
GCText {
text: index + 1
font {
pixelSize: Math.max(clock.radius / 30, 1)
......@@ -233,7 +233,7 @@ ActivityBase {
}
/* Help text */
Text {
GCText {
id: helper
text: Activity.get2CharValue(
items.currentH) + ":" + Activity.get2CharValue(
......
......@@ -20,6 +20,8 @@
*/
import QtQuick 2.0
import "../../core"
Rectangle {
id: button
height: parent.height / 4
......@@ -32,7 +34,7 @@ Rectangle {
signal clicked
Text {
GCText {
id: buttonText
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
......
......@@ -92,7 +92,7 @@ ActivityBase {
items.targetColor3)
}
Text {
GCText {
text: qsTr("Match the color")
font.pointSize: 18
horizontalAlignment: Text.AlignRight
......@@ -105,7 +105,7 @@ ActivityBase {
}
}
Text {
GCText {
id: helpMessage
text: ""
font.pointSize: 16
......
......@@ -84,7 +84,7 @@ ActivityBase {
}
}
Text {
GCText {
id: questionItem
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
......
......@@ -115,7 +115,7 @@ ActivityBase {
}
}
Text {
GCText {
id: pointNumberText
opacity: pointImageOpacity
......
......@@ -23,6 +23,8 @@ import QtQuick 2.1
import GCompris 1.0
import "enumerate.js" as Activity
import "../../core"
Rectangle {
id: answerBackground
width: 140 * ApplicationInfo.ratio
......@@ -113,7 +115,7 @@ Rectangle {
Activity.setUserAnswer(imgPath, parseInt(userEntry.text))
}
Text {
GCText {
id: userEntry
anchors {
left: img.right
......
......@@ -109,7 +109,7 @@ ActivityBase {
}
}
Text {
GCText {
id: text
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
......
......@@ -105,7 +105,7 @@ Item {
return (unmatchedIndex === text.length);
}
Text {
GCText {
id: wordText
text: ""
......@@ -120,7 +120,7 @@ Item {
clip: false
}
Text {
GCText {
id: highlightedWordText
anchors.fill: parent
......
......@@ -23,6 +23,8 @@ import QtQuick 2.2
import QtQuick.Controls 1.1
import GCompris 1.0
import "../../core"
Item {
property Component delegate: cellDelegate
......@@ -55,7 +57,7 @@ Item {
focus: false
Component.onCompleted: setText()
Text {
GCText {
id: numberText
anchors.fill: parent
......
......@@ -43,7 +43,7 @@ Rectangle {
goalText.text = goalText.setTextGoal(goal)
}
Text {
GCText {
id: goalText
function setTextGoal(goal) {
......
......@@ -22,6 +22,8 @@
import QtQuick 2.2
import GCompris 1.0
import "../../core"
Rectangle {
property var text : warningText
......@@ -34,7 +36,7 @@ Rectangle {
anchors.horizontalCenter: topPanel.horizontalCenter
anchors.verticalCenter: topPanel.verticalCenter
Text {
GCText {
id: warningText
text: qsTr("Be careful, a troggle !")
font.pointSize: ApplicationInfo.ratio * 25
......
......@@ -23,6 +23,7 @@ import QtQuick 2.2
import QtQuick.Controls 1.1
import GCompris 1.0
import "../../core"
import "gnumch-equality.js" as Activity
Rectangle {
......@@ -136,7 +137,7 @@ Rectangle {
}
Text {
GCText {
id: warning
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
......
......@@ -21,6 +21,7 @@
*/
import QtQuick 2.1
import GCompris 1.0
import "../../core"
import "guessnumber.js" as Activity
Rectangle {
......@@ -96,7 +97,7 @@ Rectangle {
Activity.setUserAnswer(parseInt(userEntry.text))
}
Text {
GCText {
id: userEntry
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
......
......@@ -64,7 +64,7 @@ ActivityBase {
id: helico
}
Text {
GCText {
id: textArea
anchors.top: parent.top
anchors.topMargin: 10
......@@ -85,7 +85,7 @@ ActivityBase {
anchors.topMargin: 10
}
Text {
GCText {
id: userInfo
anchors.top: textArea.bottom
anchors.topMargin: 15
......
......@@ -124,7 +124,7 @@ ActivityBase {
width: wordListView.width * 0.8
height: wordListView.buttonHeight
Text {
GCText {
id: wordText
anchors.fill: parent
anchors.margins: 5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment