OSDN Git Service

QmlDesigner.propertyEditor: layout fixes for expression editing
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Thu, 21 Jul 2011 09:55:54 +0000 (11:55 +0200)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>
Thu, 21 Jul 2011 10:08:03 +0000 (12:08 +0200)
Task-number: QTCREATORBUG-5045
Change-Id: Ie3ab670edef3aa82187ca0e4cfb1124218ff6a29
Reviewed-on: http://codereview.qt.nokia.com/1936
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml
share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml

index e3cc06d..3e6a865 100644 (file)
@@ -35,7 +35,7 @@ import Bauhaus 1.0
 
 QWidget {
     id: expressionEditor;
-    x: 6
+    x: 16
     y: -400
     width: frame.width - 22
     height: 40
index 317fcaa..7468dab 100644 (file)
@@ -108,8 +108,12 @@ AnimatedToolButton {
     QAction {
         text: qsTr("Set Expression");
         onTriggered: {
-            expressionEdit.globalY = extendedFunctionButton.globalY;
+            expressionEdit.globalY = extendedFunctionButton.globalY - 10;
             expressionEdit.backendValue = extendedFunctionButton.backendValue
+
+            if ((expressionEdit.y + expressionEdit.height + 20) > frame.height)
+                expressionEdit.y = frame.height - expressionEdit.height - 20
+
             expressionEdit.show();
             expressionEdit.raise();
             expressionEdit.active = true;