Browse Source

Merge pull request #2831 from alexvandesande/ui-fixes-avsa

edit button changes, color of selected blocks
cl-refactor
Gav Wood 10 years ago
parent
commit
07c59dc537
  1. 26
      mix/qml/Block.qml
  2. 21
      mix/qml/Watchers.qml
  3. BIN
      mix/qml/img/rightarrowcircle.png
  4. 1
      mix/res.qrc

26
mix/qml/Block.qml

@ -23,6 +23,11 @@ ColumnLayout
property int blockIndex property int blockIndex
property variant scenario property variant scenario
property string labelColor: "#414141" property string labelColor: "#414141"
property string selectedBlockColor: "#accbf2"
property string selectedBlockForeground: "#445e7f"
property int scenarioIndex property int scenarioIndex
signal txSelected(var txIndex) signal txSelected(var txIndex)
@ -105,14 +110,15 @@ ColumnLayout
} }
} }
Label Image {
{
text: qsTr("EDIT")
color: "#1397da"
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 14 anchors.rightMargin: 14
visible: number === -2 visible: number === -2
source: "qrc:/qml/img/edit_combox.png"
height: 15
fillMode: Image.PreserveAspectFit
MouseArea MouseArea
{ {
anchors.fill: parent anchors.fill: parent
@ -122,6 +128,7 @@ ColumnLayout
projectModel.stateListModel.editState(scenarioIndex) projectModel.stateListModel.editState(scenarioIndex)
} }
} }
} }
} }
} }
@ -237,11 +244,12 @@ ColumnLayout
function select() function select()
{ {
rowContentTr.selected = true rowContentTr.selected = true
rowContentTr.color = "#4F4F4F" rowContentTr.color = selectedBlockColor
hash.color = "#EAB920" hash.color = selectedBlockForeground
func.color = "#EAB920" func.color = selectedBlockForeground
txSelected(index) txSelected(index)
} }
function deselect() function deselect()
@ -345,7 +353,7 @@ ColumnLayout
Image { Image {
id: debugImg id: debugImg
source: "qrc:/qml/img/rightarrow@2x.png" source: "qrc:/qml/img/rightarrowcircle.png"
width: debugActionWidth width: debugActionWidth
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter

21
mix/qml/Watchers.qml

@ -12,13 +12,16 @@ import "js/QEtherHelper.js" as QEtherHelper
import "." import "."
Rectangle { Rectangle {
color: "#4F4F4F" color: selectedBlockColor
property variant tx property variant tx
property variant currentState property variant currentState
property variant bc property variant bc
property var blockIndex property var blockIndex
property var txIndex property var txIndex
property string selectedBlockColor: "#accbf2"
property string selectedBlockForeground: "#445e7f"
function clear() function clear()
{ {
from.text = "" from.text = ""
@ -83,11 +86,11 @@ Rectangle {
id: fromLabel id: fromLabel
text: qsTr("from") text: qsTr("from")
visible: false visible: false
color: "#EAB920" color: selectedBlockForeground
} }
Label { Label {
id: from id: from
color: "#EAB920" color: selectedBlockForeground
elide: Text.ElideRight elide: Text.ElideRight
maximumLineCount: 1 maximumLineCount: 1
clip: true clip: true
@ -97,11 +100,11 @@ Rectangle {
id: toLabel id: toLabel
text: qsTr("to") text: qsTr("to")
visible: false visible: false
color: "#EAB920" color: selectedBlockForeground
} }
Label { Label {
id: to id: to
color: "#EAB920" color: selectedBlockForeground
elide: Text.ElideRight elide: Text.ElideRight
maximumLineCount: 1 maximumLineCount: 1
clip: true clip: true
@ -109,7 +112,7 @@ Rectangle {
} }
Label { Label {
id: value id: value
color: "#EAB920" color: selectedBlockForeground
font.italic: true font.italic: true
clip: true clip: true
} }
@ -118,9 +121,9 @@ Rectangle {
Image { Image {
anchors.right: rowHeader.parent.right anchors.right: rowHeader.parent.right
anchors.top: rowHeader.parent.top anchors.top: rowHeader.parent.top
anchors.topMargin: -3 anchors.topMargin: 5
source: "qrc:/qml/img/edittransaction2.png" source: "qrc:/qml/img/edit_combox.png"
height: 30 height: 15
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
visible: from.text !== "" visible: from.text !== ""
MouseArea MouseArea

BIN
mix/qml/img/rightarrowcircle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

1
mix/res.qrc

@ -86,6 +86,7 @@
<file>qml/img/restoreicon@2x.png</file> <file>qml/img/restoreicon@2x.png</file>
<file>qml/img/rightarrow.png</file> <file>qml/img/rightarrow.png</file>
<file>qml/img/rightarrow@2x.png</file> <file>qml/img/rightarrow@2x.png</file>
<file>qml/img/rightarrowcircle.png</file>
<file>qml/img/saveicon.png</file> <file>qml/img/saveicon.png</file>
<file>qml/img/saveicon@2x.png</file> <file>qml/img/saveicon@2x.png</file>
<file>qml/img/sendtransactionicon.png</file> <file>qml/img/sendtransactionicon.png</file>

Loading…
Cancel
Save