From: Marcin Kaźmierczak Date: Tue, 1 Feb 2011 15:20:16 +0000 (+0100) Subject: add revert button image. Add new comboBox feature - cancel and return to latest selec... X-Git-Url: https://vcs.maemo.org/git/?p=mdictionary;a=commitdiff_plain;h=167cf3e2aa59a8e0b3de7582a6f9e7e53b082016 add revert button image. Add new comboBox feature - cancel and return to latest selected item when click on image_down icon --- diff --git a/data/button/revert.png b/data/button/revert.png new file mode 100644 index 0000000..567f6f0 Binary files /dev/null and b/data/button/revert.png differ diff --git a/data/gui.qrc b/data/gui.qrc index 604d56a..7ee2d8f 100644 --- a/data/gui.qrc +++ b/data/gui.qrc @@ -29,5 +29,6 @@ button/go-clear.png button/up_enable.png button/down_enable.png + button/revert.png diff --git a/src/mdictionary/qml/ComboBox.qml b/src/mdictionary/qml/ComboBox.qml index cb9e6d0..b863e3c 100644 --- a/src/mdictionary/qml/ComboBox.qml +++ b/src/mdictionary/qml/ComboBox.qml @@ -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 { diff --git a/src/mdictionary/qml/GoogleDialog.qml b/src/mdictionary/qml/GoogleDialog.qml index 8235499..13e9526 100644 --- a/src/mdictionary/qml/GoogleDialog.qml +++ b/src/mdictionary/qml/GoogleDialog.qml @@ -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() } }