Browse Source

Merge pull request #1752 from arkpar/mix_ux

Mix: debugger values usability enchacements
cl-refactor
Arkadiy Paronyan 10 years ago
parent
commit
4c4a36dddc
  1. 1
      mix/qml/QBoolTypeView.qml
  2. 1
      mix/qml/QHashTypeView.qml
  3. 11
      mix/qml/QIntTypeView.qml
  4. 10
      mix/qml/QStringTypeView.qml
  5. 13
      mix/qml/StructView.qml
  6. 18
      mix/qml/VariablesView.qml

1
mix/qml/QBoolTypeView.qml

@ -6,6 +6,7 @@ Item
id: editRoot
property string value
property string defaultValue
property alias readOnly: !boolCombo.enabled
height: 20
width: 150

1
mix/qml/QHashTypeView.qml

@ -3,6 +3,7 @@ import QtQuick 2.0
Item
{
property alias value: textinput.text
property alias readOnly: textinput.readOnly
id: editRoot
height: 20
width: 150

11
mix/qml/QIntTypeView.qml

@ -1,12 +1,12 @@
import QtQuick 2.0
import QtQuick.Layouts 1.1
Item
{
property alias value: textinput.text
property alias readOnly: textinput.readOnly
id: editRoot
height: 20
width: 150
width: readOnly ? textinput.implicitWidth : 150
SourceSansProBold
{
@ -22,12 +22,7 @@ Item
anchors.fill: parent
font.family: boldFont.name
clip: true
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: textinput.forceActiveFocus()
}
selectByMouse: true
}
}
}

10
mix/qml/QStringTypeView.qml

@ -3,9 +3,10 @@ import QtQuick 2.0
Item
{
property alias value: textinput.text
property alias readOnly: textinput.readOnly
id: editRoot
height: 20
width: 150
width: readOnly ? textinput.implicitWidth : 150
SourceSansProBold
{
@ -22,12 +23,7 @@ Item
anchors.fill: parent
wrapMode: Text.WrapAnywhere
font.family: boldFont.name
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: textinput.forceActiveFocus()
}
selectByMouse: true
}
}
}

13
mix/qml/StructView.qml

@ -12,7 +12,7 @@ Column
property int transactionIndex
property string context
Layout.fillWidth: true
spacing: 10
spacing: 0
Repeater
{
id: repeater
@ -22,7 +22,7 @@ Column
RowLayout
{
id: row
height: 30 + (members[index].type.category === QSolidityType.Struct ? (20 * members[index].type.members.length) : 0)
height: 20 + (members[index].type.category === QSolidityType.Struct ? (20 * members[index].type.members.length) : 0)
Layout.fillWidth: true
DefaultLabel {
height: 20
@ -32,12 +32,14 @@ Column
}
DefaultLabel {
height: 20
id: nameLabel
text: modelData.name
anchors.verticalCenter: parent.verticalCenter
}
DefaultLabel {
height: 20
id: equalLabel
text: "="
anchors.verticalCenter: parent.verticalCenter
@ -45,6 +47,7 @@ Column
Loader
{
id: typeLoader
height: 20
anchors.verticalCenter: parent.verticalCenter
sourceComponent:
{
@ -69,10 +72,10 @@ Column
var ptype = members[index].type;
var pname = members[index].name;
var vals = value;
item.readOnly = context === "variable";
if (ptype.category === QSolidityType.Address)
{
item.value = getValue();
item.readOnly = context === "variable";
if (context === "parameter")
{
var dec = modelData.type.name.split(" ");
@ -119,6 +122,10 @@ Column
vals[pname] = item.value;
valueChanged();
});
var newWidth = nameLabel.width + typeLabel.width + item.width + 108;
if (root.width < newWidth)
root.width = newWidth;
}
function getValue()

18
mix/qml/VariablesView.qml

@ -18,15 +18,15 @@ DebugInfoList
property alias members: typeLoader.members;
property alias value: typeLoader.value;
anchors.fill: parent
StructView
{
id: typeLoader
members: []
value: {}
Layout.preferredWidth: parent.width
context: "variable"
width: parent.width
}
anchors.rightMargin: 8
StructView
{
id: typeLoader
members: []
value: {}
context: "variable"
width:parent.width
}
}
}

Loading…
Cancel
Save