From 167cf3e2aa59a8e0b3de7582a6f9e7e53b082016 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marcin=20Ka=C5=BAmierczak?= Date: Tue, 1 Feb 2011 16:20:16 +0100 Subject: [PATCH] add revert button image. Add new comboBox feature - cancel and return to latest selected item when click on image_down icon --- data/button/revert.png | Bin 0 -> 1787 bytes data/gui.qrc | 1 + src/mdictionary/qml/ComboBox.qml | 15 +++++++++++---- src/mdictionary/qml/GoogleDialog.qml | 3 +-- 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 data/button/revert.png diff --git a/data/button/revert.png b/data/button/revert.png new file mode 100644 index 0000000000000000000000000000000000000000..567f6f0ee5fbfb9824f9c81b3467bb9def859fa0 GIT binary patch literal 1787 zcmVPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipPx z4+93jL&Jgq00w(WL_t(o!|hmWY+S_^{?3`1d*|+YcfEd-I0j;Hs?bNAh&+@>p$csX z6%bIOHlh##Y9&%ZMJcMPB2l#>EyPi2ORN3@Diy?|&Qz z%%i69o&vzhf61@cJK8V1X7y#QS1cTD>^jlg<^K9{03ZMcfKIvsz$@-nn^eOqI` znKP*xn%}&5{b*C?>qqvu!?O**OS&nsuy~7JynOZM-#6r&nG`{jLUp>9<~4ohrqPDK z{PxJ+aB#K&=nCT+fNoihrWMz%-_uxop;pXLq`->cX^WanJqM}GEpC3#FMB&tm?{AN zkY^>s27s4qL{pM9k!Ki3d53egw<0SO^=MJP5{bm^73y6iKkO@DpivTJV7 zW^38GF)%B5%D~eWh7B|uXx327$fas&N!yo}_GSL?@7^xiKNA2x0B_-q>ho=DzR;1+ zHLybwL}$x)YD~(rUGEuUHZP%+_ojgvs7@S@uw6U zCQ7Cvz=?y1Ojt!l7eUdDqsnIKr{8#W-OBIiA596s^1IXxs=4h>8)TS?5vU9Tl|!I% zNa<=2sDg2UKoS-NB7ik1cshVFDHygOBGl#P@UOP+{_gU7)TVRMeO7CK;1bcS;hO-~ z_^`@{H36&%&{Wd|hjIAE!dDhn`$(G{QeGNXTUZ^SI;h2&u@Pvnq=PJ3W#hTD537B& zG_=uVxjn0OfA63NAOj#(*>8IE`c424DzRKzc?5_gf+S_vtXs5^&sPa2ITH>*Sbpl_ z0F1Lh%1(#@l|3`%rq40vDteUkP)e&$JYRlOCK#2(I-NVcc zbP!22A$~zfW(**#FdhOGG9VManIJ-vae@eD%m5|XIp8cYNt#?HV0&Q;kQ`PwEaYT;|| zqtnnoe&{RQyx@uIY@V%`gT8|IDmjjO$d4^MnPZzTKNdW z0(QRf_<&a&-Sk27#2+L?1Mgz^@JsK0d3fk#M8eSQC%H)F!p9~5izHbHxKCuEy z0itl~I7Yhvxc{n??;S0QbMTa%I6|?H$Q99Z;I&gHhYqj9{cy7Z;4B6J6prjh|Nh-C zt{ogY;g}Q@Ybf?01oWLa5boOhfwoa;(So^M!96Y;0I?UB0TGd}A^A z{!#b*tJ~K8c}Jo9SfKkfQCa{1002ovPDHLkV1kbutton/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() } } -- 1.7.9.5