Browse Source

ui bug fix

cl-refactor
yann300 9 years ago
parent
commit
b0865ea28f
  1. 10
      mix/qml/QBoolTypeView.qml
  2. 14
      mix/qml/StructView.qml
  3. 4
      mix/qml/TransactionDialog.qml

10
mix/qml/QBoolTypeView.qml

@ -53,12 +53,16 @@ Item
for (var k in JSON.parse(boolArray.text))
formattedparam.push(parseInt(format(param[k])))
boolArray.text = JSON.stringify(formattedparam)
value = ""
value = boolArray.text
console.log("gfdg " + value)
}
}
function finalize()
{
if (isArray())
value = boolArray.text
}
function format(value)
{
value = value === true ? "1" : value

14
mix/qml/StructView.qml

@ -91,11 +91,6 @@ Column
var pname = members[index].name;
var vals = value;
item.onValueChanged.connect(function() {
vals[pname] = item.value;
valueChanged();
});
item.readOnly = context === "variable";
if (ptype.category === QSolidityType.Address)
{
@ -107,7 +102,6 @@ Column
item.subType = dec[0];
item.load();
}
console.log("jj" + pname)
item.init();
}
else if (ptype.category === QSolidityType.Struct && !item.members)
@ -124,9 +118,17 @@ Column
item.init();
}
item.onValueChanged.connect(function() {
vals[pname] = item.value;
valueChanged();
});
var newWidth = nameLabel.width + typeLabel.width + item.width + 108;
if (root.width < newWidth)
root.width = newWidth;
if (item.finalize)
item.finalize()
}
function getValue()

4
mix/qml/TransactionDialog.qml

@ -246,7 +246,7 @@ Dialog {
functionRect.show()
loadFunctions(TransactionHelper.contractFromToken(recipientsAccount.currentValue()))
loadParameters();
//paramScroll.updateView()
paramScroll.updateView()
}
else
{
@ -492,7 +492,7 @@ Dialog {
StructView
{
id: paramScroll
members: paramsModel;
members: paramsModel
accounts: senderComboBox.model
context: "parameter"
Layout.fillWidth: true

Loading…
Cancel
Save