Black fields hidden when equal times in new game dialog
authorHeli Hyvättinen <heli.hyvattinen@kymp.net>
Thu, 18 Aug 2011 17:56:33 +0000 (20:56 +0300)
committerHeli Hyvättinen <heli.hyvattinen@kymp.net>
Thu, 18 Aug 2011 17:56:33 +0000 (20:56 +0300)
qml/NewGameDialogPage.qml

index 57979a3..3f2772e 100644 (file)
@@ -30,7 +30,7 @@ import ChessClocks 1.0
 Page
 {
     id: newGameDialogPage
-    tools: commonTools
+
     orientationLock: PageOrientation.LockLandscape
 
     property string name
@@ -38,6 +38,11 @@ Page
     property bool askAddition
     property bool askTurnsPerAddition
 
+    tools: ToolBarLayout
+    {
+        ToolButton { iconSource: "toolbar-back"; onClicked: pageStack.pop() }
+    }
+
 
 
            Label
@@ -46,7 +51,7 @@ Page
 
                 color:"white"
                 font.pointSize: 64
-                text: newGameDialog.name
+                text: newGameDialogPage.name
             }
 
             Row
@@ -138,7 +143,7 @@ Page
             TextField
             {
                 id: blackInitialTime
-                enabled: !equalTimesSwitch.checked
+                visible: !equalTimesSwitch.checked
 
                 readOnly: true
 
@@ -204,8 +209,7 @@ Page
             TextField
             {
                 id: blackAdditionalTime
-                visible: newGameDialogPage.askAddition
-                enabled: !equalTimesSwitch.checked
+                visible: newGameDialogPage.askAddition && !equalTimesSwitch.checked
                 readOnly: true
 
                 anchors.top: whiteInitialTime.bottom
@@ -258,7 +262,7 @@ Page
             TextField
             {
                 id: blackTurnsPerAddition
-                visible: newGameDialogPage.askTurnsPerAddition
+                visible: newGameDialogPage.askTurnsPerAddition && !equalTimesSwitch.checked
                 readOnly: true;
 
                 anchors.top: whiteAdditionalTime.bottom