add revert button image. Add new comboBox feature - cancel and return to latest selec...
[mdictionary] / src / mdictionary / qml / ComboBox.qml
index cb9e6d0..b863e3c 100644 (file)
@@ -47,16 +47,23 @@ Rectangle {
 
     Image {
         id: imageDown
-        z:4;
+        z:15;
         width: 11;
         height: 0.5 * rectangle1.height;
         anchors.top: parent.top
         anchors.right: parent.right
-        anchors.bottom: parent.bottom
         anchors.topMargin: 4
         anchors.rightMargin: 6
         anchors.bottomMargin: 4
         source: "qrc:/button/down_enable.png";
+
+        MouseArea{
+            id: imgMouseArea
+            anchors.fill: parent
+            onClicked: {
+                rectangle1.show(!rectangle1.expanded)
+            }
+        }
     }
 
     MouseArea{
@@ -127,7 +134,7 @@ Rectangle {
             PropertyChanges { target: text1; z: 0; visible: true }
             PropertyChanges { target: rectangle1; border.width: 1}
             PropertyChanges { target: rectangle1; height: rectangle1.basicHeight}
-            PropertyChanges { target: imageDown; visible: true}
+            PropertyChanges { target: imageDown; height: 0.5 * rectangle1.basicHeight}
             PropertyChanges { target: shadeDisable; visible: false; z:-1}
         },
         State {
@@ -137,7 +144,7 @@ Rectangle {
             PropertyChanges { target: text1; z: 10; visible: false }
             PropertyChanges { target: rectangle1; border.width: 0}
             PropertyChanges { target: rectangle1; height: rectangle1.expandedHeight}
-            PropertyChanges { target: imageDown; visible: false}
+            PropertyChanges { target: imageDown; height: 0.5 * rectangle1.basicHeight}
             PropertyChanges { target: shadeDisable; visible: false; z: -1}
         },
         State {