Browse Source

ui changes

cl-refactor
yann300 10 years ago
parent
commit
42a3432947
  1. 35
      mix/qml/Block.qml
  2. 14
      mix/qml/BlockChain.qml
  3. 10
      mix/qml/MainContent.qml

35
mix/qml/Block.qml

@ -28,12 +28,12 @@ ColumnLayout
if (transactions)
{
if (index >= 0)
return 30 + 30 * transactions.count + openedTr
return trHeight + trHeight * transactions.count + openedTr
else
return 30
return trHeight
}
else
return 30
return trHeight
}
onOpenedTrChanged:
@ -46,6 +46,19 @@ ColumnLayout
id: dbgStyle
}
Rectangle
{
id: top
Layout.preferredWidth: blockWidth
height: 10
anchors.bottom: rowHeader.top
color: "#DEDCDC"
radius: 15
anchors.left: parent.left
anchors.leftMargin: statusWidth
anchors.bottomMargin: -5
}
RowLayout
{
Layout.preferredHeight: trHeight
@ -201,12 +214,11 @@ ColumnLayout
{
anchors.top: parent.top
width: parent.width
spacing: 7
spacing: 20
RowLayout
{
anchors.top: parent.top
Layout.fillWidth: true
//spacing: cellSpacing
Rectangle
{
Layout.preferredWidth: fromWidth
@ -390,5 +402,18 @@ ColumnLayout
}
}
}
Rectangle
{
id: right
Layout.preferredWidth: blockWidth
height: 10
anchors.top: parent.bottom
anchors.topMargin: 5
color: "#DEDCDC"
radius: 15
anchors.left: parent.left
anchors.leftMargin: statusWidth
}
}

14
mix/qml/BlockChain.qml

@ -37,17 +37,17 @@ ColumnLayout {
onWidthChanged:
{
if (width <= 630 || previousWidth <= 630)
var minWidth = scenarioMinWidth - 20 // margin
if (width <= minWidth || previousWidth <= minWidth)
{
fromWidth = 150
fromWidth = 100
toWidth = 100
valueWidth = 200
}
else
{
var diff = (width - previousWidth) / 3;
fromWidth = fromWidth + diff < 150 ? 150 : fromWidth + diff
fromWidth = fromWidth + diff < 100 ? 100 : fromWidth + diff
toWidth = toWidth + diff < 100 ? 100 : toWidth + diff
valueWidth = valueWidth + diff < 200 ? 200 : valueWidth + diff
}
@ -97,7 +97,7 @@ ColumnLayout {
}
Rectangle
{
Layout.preferredWidth: fromWidth + cellSpacing
Layout.preferredWidth: fromWidth
Label
{
anchors.verticalCenter: parent.verticalCenter
@ -139,12 +139,12 @@ ColumnLayout {
{
id: blockChainScrollView
anchors.fill: parent
anchors.topMargin: 10
anchors.topMargin: 8
ColumnLayout
{
id: blockChainLayout
width: parent.width
spacing: 10
spacing: 20
Block
{

10
mix/qml/MainContent.qml

@ -31,6 +31,7 @@ Rectangle {
property alias codeEditor: codeEditor
property bool webViewHorizontal: codeWebSplitter.orientation === Qt.Vertical //vertical splitter positions elements vertically, splits screen horizontally
property bool firstCompile: true
property int scenarioMinWidth: 590
Connections {
target: codeModel
@ -110,6 +111,7 @@ Rectangle {
property alias webHeight: webPreview.height
property alias showProjectView: projectList.visible
property bool runOnProjectLoad: true
property int scenarioMinWidth: scenarioMinWidth
}
ColumnLayout
@ -205,7 +207,7 @@ Rectangle {
visible: false;
Layout.fillHeight: true
Keys.onEscapePressed: visible = false
Layout.minimumWidth: 650
Layout.minimumWidth: scenarioMinWidth
anchors.right: parent.right
}
@ -215,7 +217,7 @@ Rectangle {
visible: false
Layout.fillHeight: true
Keys.onEscapePressed: visible = false
Layout.minimumWidth: 650
Layout.minimumWidth: scenarioMinWidth
anchors.right: parent.right
}
@ -224,10 +226,9 @@ Rectangle {
onDebugDataReady: {
scenarioExe.visible = false
debugPanel.visible = true
debugPanel.width = scenarioExe.width
if (scenarioExe.bc.debugTrRequested)
{
debugPanel.setTr(scenarioExe.bc.model.blocks[scenarioExe.bc.debugTrRequested[0]].transactions[scenarioExe.bc.debugTrRequested[1]])
}
}
}
@ -236,6 +237,7 @@ Rectangle {
onPanelClosed: {
debugPanel.visible = false
scenarioExe.visible = true
scenarioExe.width = debugPanel.width
}
}
}

Loading…
Cancel
Save