Some more progress at custom combobox qmlfrontend
authorunc0rr
Wed, 03 Dec 2014 00:20:21 +0300
branchqmlfrontend
changeset 10608 b85759f2ba18
parent 10606 8e95911cb86b
child 10610 eadf2cea55e0
Some more progress at custom combobox
qmlFrontend/qml/qmlFrontend/GameConfig.qml
qmlFrontend/qml/qmlFrontend/HWComboBox.qml
--- a/qmlFrontend/qml/qmlFrontend/GameConfig.qml	Wed Dec 03 00:07:33 2014 +0300
+++ b/qmlFrontend/qml/qmlFrontend/GameConfig.qml	Wed Dec 03 00:20:21 2014 +0300
@@ -38,6 +38,7 @@
     }
 
     HWComboBox {
+        id: cbTheme
         x: 320
         y: 16
         width: 100
@@ -48,13 +49,15 @@
             height: 25
             width: 100
             color: "transparent"
-            Text {id: themeName; text: modelData }
+            Row {
+                Image {width: height; height: parent.height; source: "image://theme/" + modelData}
+                Text {id: themeName; text: modelData }
+            }
             MouseArea {
                  z: 1
                  anchors.fill: parent
                  onClicked: {
-                     themeImage.source = "image://theme/" + themeName.text
-                     model.currentIndex = index
+                     cbTheme.currentIndex = index
                      HWEngine.setTheme(themeName.text)
                  }
             }
--- a/qmlFrontend/qml/qmlFrontend/HWComboBox.qml	Wed Dec 03 00:07:33 2014 +0300
+++ b/qmlFrontend/qml/qmlFrontend/HWComboBox.qml	Wed Dec 03 00:20:21 2014 +0300
@@ -4,6 +4,7 @@
 HWButton {
     property alias model: itemsList.model
     property alias delegate: itemsList.delegate
+    property alias currentIndex: itemsList.currentIndex
 
     Window {
         id: selection