summaryrefslogtreecommitdiffstats
path: root/QtDemo
diff options
context:
space:
mode:
authorLasse Räihä <lasse.raiha@digia.com>2013-06-07 15:25:57 +0300
committerKimmo Ollila <kimmo.ollila@digia.com>2013-06-07 15:30:43 +0300
commit50e9583afa4bb4c3362f4c3ff1ca242af65ceed7 (patch)
tree796fd84a36c2c2c9564a885921958b189ca77e27 /QtDemo
parent123aeaa756b74f886b64aa2fb157e908a8e24ec9 (diff)
Added font.
Change-Id: I8be34ec7020538c8e13073557cbb0be92d68bee7 Reviewed-by: Kimmo Ollila <kimmo.ollila@digia.com>
Diffstat (limited to 'QtDemo')
-rw-r--r--QtDemo/qml/QtDemo/Group.qml23
-rw-r--r--QtDemo/qml/QtDemo/Slide.qml4
-rw-r--r--QtDemo/qml/QtDemo/SplashScreen.qml4
-rw-r--r--QtDemo/qml/QtDemo/engine.js35
-rw-r--r--QtDemo/qml/QtDemo/fonts/Purisa-Bold.ttfbin0 -> 142164 bytes
-rw-r--r--QtDemo/qml/QtDemo/fonts/Purisa-BoldOblique.ttfbin0 -> 149880 bytes
-rw-r--r--QtDemo/qml/QtDemo/fonts/Purisa-Oblique.ttfbin0 -> 155836 bytes
-rw-r--r--QtDemo/qml/QtDemo/fonts/Purisa.ttfbin0 -> 152564 bytes
-rw-r--r--QtDemo/qml/QtDemo/main.qml5
9 files changed, 46 insertions, 25 deletions
diff --git a/QtDemo/qml/QtDemo/Group.qml b/QtDemo/qml/QtDemo/Group.qml
index 30524a2..a2e0f50 100644
--- a/QtDemo/qml/QtDemo/Group.qml
+++ b/QtDemo/qml/QtDemo/Group.qml
@@ -10,12 +10,23 @@ Item {
property int uid: 0
property real targetScale: 1
- property string name: "Text"
+ property string textSource: "images/txt_feeds.png"
property int textX: 0
property int textY: 0
+ property string name: "Text"
+ property real imageScale: 6.0
+
+ /*Image {
+ x: group.textX
+ y: group.textY
+ source: group.textSource
+ smooth: true
+ scale: group.imageScale
+ }*/
+
property int fontSize: 120
- property string uiFont: "Mukti Narrow"
- property bool bold: false
+ property string uiFont: "Purisa"
+ property bool bold: true
property int fontTransition: 6
Text {
@@ -23,18 +34,18 @@ Item {
x: textX
y: textY
font.pixelSize: group.fontSize
- font.family: group.uiFont
+ font.family: "Purisa"
font.bold: group.bold
color: "#42200a"
smooth: true
Text {
text: group.name
- color: "#779e3e"
+ color: "#1d6cb0"
x:group.fontTransition
y:-group.fontTransition
font.pixelSize: group.fontSize
- font.family: group.uiFont
+ font.family: "Purisa"
font.bold: group.bold
smooth: true
}
diff --git a/QtDemo/qml/QtDemo/Slide.qml b/QtDemo/qml/QtDemo/Slide.qml
index dda4025..46a5191 100644
--- a/QtDemo/qml/QtDemo/Slide.qml
+++ b/QtDemo/qml/QtDemo/Slide.qml
@@ -49,7 +49,9 @@ Item {
Text {
id: splashScreenText
color: 'white'
- font.pixelSize: parent.width *.12
+ font.pixelSize: parent.width *.13
+ font.family: "Purisa"
+ font.bold: true
text: slide.name
anchors.centerIn: parent
smooth: true
diff --git a/QtDemo/qml/QtDemo/SplashScreen.qml b/QtDemo/qml/QtDemo/SplashScreen.qml
index b97c314..5fe8edf 100644
--- a/QtDemo/qml/QtDemo/SplashScreen.qml
+++ b/QtDemo/qml/QtDemo/SplashScreen.qml
@@ -22,7 +22,9 @@ Item {
Text {
id: txt
color: 'white'
- font.pixelSize: parent.width *.1
+ font.pixelSize: parent.width *.13
+ font.family: "Purisa"
+ font.bold: true
anchors.centerIn: parent
smooth: true
}
diff --git a/QtDemo/qml/QtDemo/engine.js b/QtDemo/qml/QtDemo/engine.js
index b0b4ace..366837b 100644
--- a/QtDemo/qml/QtDemo/engine.js
+++ b/QtDemo/qml/QtDemo/engine.js
@@ -1,32 +1,32 @@
var positions = [
{x:-1100, y:-1650, gid: 0, url: "demos/rssnews/rssnews.qml", device: 3, name: "Rss Reader"},
{x:-2100, y:-1550, gid: 0, url: "demos/gridrssnews/main.qml", device: 7, name: "Rss Reader"},
- {x:-1500, y:-1200, gid: 0, url: "demos/tweetsearch/tweetsearch.qml", device: 2, name: "Tweet Search"},
+ {x:-1500, y:-1200, gid: 0, url: "demos/tweetsearch/tweetsearch.qml", device: 2, name: "Tweet\nSearch"},
- {x:1300, y:-1600, gid: 1, url: "demos/canvasclock/canvasClock.qml", device: 4, name: "Canvas Clock"},
- {x:2020, y:-1520, gid: 1, url: "demos/heartmonitor/main.qml", device: 5, name: "Heart Monitor"},
+ {x:1300, y:-1600, gid: 1, url: "demos/canvasclock/canvasClock.qml", device: 4, name: "Canvas\n Clock"},
+ {x:2020, y:-1520, gid: 1, url: "demos/heartmonitor/main.qml", device: 5, name: " Heart\nMonitor"},
{x:1000, y:-300, gid: 2, url: "demos/calqlatr/Calqlatr.qml", device: 0, name: "Calqlatr"},
- {x:-500, y:-250, gid: 2, url: "demos/touchgallery/main.qml", device: 2, name: "Widget Gallery"},
- {x:200, y:-200, gid: 2, url: "demos/photosurface/photosurface.qml", device: 6, name: "Photo Surface"},
+ {x:-500, y:-250, gid: 2, url: "demos/touchgallery/main.qml", device: 2, name: "Widget\nGallery"},
+ {x:200, y:-200, gid: 2, url: "demos/photosurface/photosurface.qml", device: 6, name: " Photo\nSurface"},
- {x:-1800, y:0, gid: 3, url: "demos/maroon/Maroon.qml", device: 1, name: "Maroon in\n Trouble"},
+ {x:-1800, y:0, gid: 3, url: "demos/maroon/Maroon.qml", device: 1, name: "Maroon in\n Trouble"},
{x:-2500, y:100, gid: 3, url: "demos/samegame/samegame.qml", device: 1, name: "SameGame"},
{x:1200, y:1200, gid: 5, url: "demos/shaders/main.qml", device: 6, name: "Shaders"},
- {x:2200, y:1400, gid: 5, url: "demos/particledemo/particledemo.qml", device: 7, name: "Particle Paint"},
+ {x:2200, y:1400, gid: 5, url: "demos/particledemo/particledemo.qml", device: 7, name: "Particle\n Paint"},
- {x:-800, y:1200, gid: 4, url: "demos/video/main.qml", device: 8, name: "Qt Video"},
- {x:-1600, y:1500, gid: 4, url: "demos/radio/radio.qml", device: 5, name: "Internet Radio"}
+ {x:-800, y:1200, gid: 4, url: "demos/video/main.qml", device: 8, name: "Video"},
+ {x:-1600, y:1500, gid: 4, url: "demos/radio/radio.qml", device: 5, name: "Internet\n Radio"}
]
var groupPositions = [
- {x:-2880, y:-2100, width: 2400, height: 1200, textX: 50, textY: 50, name: "Feeds"},
- {x:700, y:-2100, width: 1700, height: 1200, textX: 50, textY: 50, name: "Canvas"},
- {x:-900, y:-800, width: 2650, height: 1300, textX: 50, textY: 50, name: "Applications"},
- {x:-3000, y:-500, width: 1750, height: 1150, textX: 50, textY: 50, name: "Games"},
- {x:-2100, y:850, width: 1950, height: 1150, textX: 50, textY: 150, name: "Multimedia"},
- {x:510, y:600, width: 2450, height: 1500, textX: 50, textY: 50, name: "Particles & Shaders"}
+ {x:-2880, y:-2100, width: 2400, height: 1200, textX: 50, textY: 50, textSource: "images/txt_feeds.png", name: "Feeds"},
+ {x:700, y:-2100, width: 1700, height: 1200, textX: 50, textY: 50, textSource: "images/txt_canvas.png", name: "Canvas"},
+ {x:-900, y:-800, width: 2650, height: 1300, textX: 50, textY: 50, textSource: "images/txt_applications.png", name: "Applications"},
+ {x:-3000, y:-500, width: 1750, height: 1150, textX: 50, textY: 50, textSource: "images/txt_games.png", name: "Games"},
+ {x:-2100, y:850, width: 1950, height: 1150, textX: 50, textY: 150, textSource: "images/txt_multimedia.png", name: "Multimedia"},
+ {x:510, y:600, width: 2450, height: 1500, textX: 50, textY: 50, textSource: "images/txt_particles.png", name: "Particles & Shaders"}
]
var imageSources = ["phone1.png","phone2.png", "phone3.png","tablet1.png", "car_device.png", "medical_device.png", "laptop1.png", "laptop2.png", "tv.png"]
@@ -79,11 +79,11 @@ function createSlide(x,y,gid,url,device,name){
function initGroups(){
groupPositions.forEach(function(pos){
- createGroup(pos.x, pos.y, pos.width, pos.height, pos.textX, pos.textY, pos.name)
+ createGroup(pos.x, pos.y, pos.width, pos.height, pos.textX, pos.textY, pos.textSource, pos.name)
})
}
-function createGroup(x,y,width,height,textX,textY,name){
+function createGroup(x,y,width,height,textX,textY,textSource,name){
var component = Qt.createComponent("Group.qml")
if (component.status === Component.Ready){
var object=component.createObject(canvas)
@@ -94,6 +94,7 @@ function createGroup(x,y,width,height,textX,textY,name){
object.height = height
object.textX = textX
object.textY = textY
+ object.textSource = textSource
object.name = name
groups.push(object)
diff --git a/QtDemo/qml/QtDemo/fonts/Purisa-Bold.ttf b/QtDemo/qml/QtDemo/fonts/Purisa-Bold.ttf
new file mode 100644
index 0000000..05986e1
--- /dev/null
+++ b/QtDemo/qml/QtDemo/fonts/Purisa-Bold.ttf
Binary files differ
diff --git a/QtDemo/qml/QtDemo/fonts/Purisa-BoldOblique.ttf b/QtDemo/qml/QtDemo/fonts/Purisa-BoldOblique.ttf
new file mode 100644
index 0000000..d2cc638
--- /dev/null
+++ b/QtDemo/qml/QtDemo/fonts/Purisa-BoldOblique.ttf
Binary files differ
diff --git a/QtDemo/qml/QtDemo/fonts/Purisa-Oblique.ttf b/QtDemo/qml/QtDemo/fonts/Purisa-Oblique.ttf
new file mode 100644
index 0000000..6d34f02
--- /dev/null
+++ b/QtDemo/qml/QtDemo/fonts/Purisa-Oblique.ttf
Binary files differ
diff --git a/QtDemo/qml/QtDemo/fonts/Purisa.ttf b/QtDemo/qml/QtDemo/fonts/Purisa.ttf
new file mode 100644
index 0000000..7233af7
--- /dev/null
+++ b/QtDemo/qml/QtDemo/fonts/Purisa.ttf
Binary files differ
diff --git a/QtDemo/qml/QtDemo/main.qml b/QtDemo/qml/QtDemo/main.qml
index 776ae1c..0d159d7 100644
--- a/QtDemo/qml/QtDemo/main.qml
+++ b/QtDemo/qml/QtDemo/main.qml
@@ -81,6 +81,11 @@ Rectangle{
onWidthChanged: calculateScales();
onHeightChanged: calculateScales();
+ FontLoader {
+ id: fontLoader
+ source: "fonts/Purisa-Bold.ttf"
+ }
+
gradient: Gradient {
GradientStop { position: 0.0; color: "#89d4ff" }
GradientStop { position: 1.0; color: "#f3fbff" }