Fix height calculation of flickable content.
[qzeecontrol] / qml / QZeeControl / KeyBindingSettings.qml
index 732b5ad..1529937 100644 (file)
@@ -1,4 +1,22 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
+/*
+ *  Copyright 2012 Ruediger Gad
+ *
+ *  This file is part of QZeeControl.
+ *
+ *  QZeeControl 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, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  QZeeControl 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 QZeeControl.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 import QtQuick 1.1
 import com.nokia.meego 1.0
 import "settingsstorage.js" as SettingsStorage
@@ -7,6 +25,7 @@ Sheet {
     id: keyBindingSettings
     anchors.fill: parent
     visualParent: mainPage
+    z: 2
 
     acceptButtonText: "Save"
     rejectButtonText: "Cancel"
@@ -48,7 +67,7 @@ Sheet {
     content: Flickable{
         anchors.fill: parent
         anchors.margins: 10
-        contentHeight: contentGrid.height
+        contentHeight: contentGrid.height + explanationLabel.height
 
         Grid{
             id: contentGrid
@@ -129,6 +148,17 @@ Sheet {
                 width: 150
             }
         }
+
+        Label{
+            id: explanationLabel
+            anchors{top: contentGrid.bottom; left: parent.left; right: parent.right; margins: 20}
+            horizontalAlignment: Text.AlignHCenter
+            wrapMode: Text.WordWrap
+
+            text: "Some possibly useful key names are:\nUp, Down, Left, Right, Return, Space\n" +
+                  "If you don't need any of these special keys just enter a single character for each key binding. " +
+                  "Upper- and lowercase characters are allowed."
+        }
     }
 }