add revert button image. Add new comboBox feature - cancel and return to latest selec...
authorMarcin Kaźmierczak <marcin@marcin-desktop.(none)>
Tue, 1 Feb 2011 15:20:16 +0000 (16:20 +0100)
committerMarcin Kaźmierczak <marcin@marcin-desktop.(none)>
Tue, 1 Feb 2011 15:20:16 +0000 (16:20 +0100)
data/button/revert.png [new file with mode: 0644]
data/gui.qrc
src/mdictionary/qml/ComboBox.qml
src/mdictionary/qml/GoogleDialog.qml

diff --git a/data/button/revert.png b/data/button/revert.png
new file mode 100644 (file)
index 0000000..567f6f0
Binary files /dev/null and b/data/button/revert.png differ
index 604d56a..7ee2d8f 100644 (file)
@@ -29,5 +29,6 @@
         <file>button/go-clear.png</file>
         <file>button/up_enable.png</file>
         <file>button/down_enable.png</file>
+        <file>button/revert.png</file>
     </qresource>
 </RCC>
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 {
index 8235499..13e9526 100644 (file)
@@ -126,8 +126,7 @@ Rectangle{
         anchors.top: fromLabel.top
         anchors.topMargin: fromLabel.height /2
         anchors.right: parent.right
-//        pathToIcon: //gimp again, ech
-        pathToIcon: "qrc:/button/up_enable.png"; //temp
+        pathToIcon: "qrc:/button/revert.png"
         onClicked: { rectangle1.revertLang() }
     }