OptionSelector {
id: currencyList
anchors.fill: parent
//multiSelection: true
expanded: true
model: CurrencyModel {}
delegate: OptionSelectorDelegate {
text: model.code
subText: model.name
iconSource: "images/" + model.icon + ".svg"
constrainImage: true
Component.onCompleted: {
// FIXME: this is a brittle hack
var image = this.children[0].children[0];
if (image && image.objectName === "icon") {
image.height -= units.gu(2);
image.anchors.verticalCenter = image.parent.verticalCenter;
}
// else: hack failed :-(
}
}
}