[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [pairs/new_qml2] src/qml: Improve window size adaptability of the
From: Aleix Pol <aleixpol () kde ! org>
Date: 2011-12-01 0:40:09
Message-ID: 20111201004009.75522A60B9 () git ! kde ! org
[Download RAW message or body]
Git commit da24803c390b2f46a30803eaa2a2fa7b6df3c2d7 by Aleix Pol.
Committed on 01/12/2011 at 01:39.
Pushed by apol into branch 'new_qml2'.
Improve window size adaptability of the options view
M +47 -52 src/qml/OptionsPage.qml
http://commits.kde.org/pairs/da24803c390b2f46a30803eaa2a2fa7b6df3c2d7
diff --git a/src/qml/OptionsPage.qml b/src/qml/OptionsPage.qml
index de87f3c..4681f1a 100644
--- a/src/qml/OptionsPage.qml
+++ b/src/qml/OptionsPage.qml
@@ -8,63 +8,58 @@ Rectangle {
color: 'green'
signal gameStarted;
- Row {
- anchors.margins: 30
+ Column {
anchors.fill: parent
-
- Column {
- height: parent.height
- Row {
- spacing: 20
- Button {
- source: playersModel.iconsDir("gameicons/pairs.png")
- text: "Pairs"
- onClicked: gameType = 'image'
- }
- Button {
- source: playersModel.iconsDir("gameicons/pairs2.png")
- text: "Pairs 2"
- onClicked: gameType = 'image2'
- }
- Button {
- source: playersModel.iconsDir("gameicons/logic.png")
- text: "Logic"
- onClicked: gameType = 'logic'
- }
- Button {
- source: playersModel.iconsDir("gameicons/sound.png")
- text: "Sound"
- onClicked: gameType = 'sound'
- }
- Button {
- source: playersModel.iconsDir("gameicons/sound.png")
- text: "SoundLogic"
- onClicked: gameType = 'soundlogic'
- }
- Button {
- source: playersModel.iconsDir("gameicons/words.png")
- text: "Words"
- onClicked: gameType = 'word'
- }
+ Flow {
+ width: parent.width
+ spacing: 20
+ Button {
+ source: playersModel.iconsDir("gameicons/pairs.png")
+ text: "Pairs"
+ onClicked: gameType = 'image'
}
+ Button {
+ source: playersModel.iconsDir("gameicons/pairs2.png")
+ text: "Pairs 2"
+ onClicked: gameType = 'image2'
+ }
+ Button {
+ source: playersModel.iconsDir("gameicons/logic.png")
+ text: "Logic"
+ onClicked: gameType = 'logic'
+ }
+ Button {
+ source: playersModel.iconsDir("gameicons/sound.png")
+ text: "Sound"
+ onClicked: gameType = 'sound'
+ }
+ Button {
+ source: playersModel.iconsDir("gameicons/sound.png")
+ text: "SoundLogic"
+ onClicked: gameType = 'soundlogic'
+ }
+ Button {
+ source: playersModel.iconsDir("gameicons/words.png")
+ text: "Words"
+ onClicked: gameType = 'word'
+ }
+ }
+
+ Flow {
+ id: themesView
+ width: parent.width
- Flow {
- id: themesView
- height: parent.height
- width: parent.width
+ Repeater {
+ model: themesModel
- Repeater {
- model: themesModel
+ delegate: Button {
+ visible: themesModel.isPertinent(index, gameType, gameLanguage)
+ source: "image://theme/"+display+"/"+decoration
+ text: display
- delegate: Button {
- visible: themesModel.isPertinent(index, gameType, gameLanguage)
- source: "image://theme/"+display+"/"+decoration
- text: display
-
- onClicked: {
- gameStarted()
- fgame.newGame(index, gameLanguage, gameType)
- }
+ onClicked: {
+ gameStarted()
+ fgame.newGame(index, gameLanguage, gameType)
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic