2024-05-27 13:13:02 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
import shared.controls 1.0
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Horizontal
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
|
|
|
SlippageSelector {
|
2024-05-27 17:37:22 +00:00
|
|
|
id: slippageSelector
|
2024-05-27 13:13:02 +00:00
|
|
|
anchors.centerIn: parent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
SplitView.preferredWidth: 300
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
font.weight: Font.Medium
|
2024-05-27 17:37:22 +00:00
|
|
|
text: "Value: %1".arg(slippageSelector.value)
|
2024-05-27 13:13:02 +00:00
|
|
|
}
|
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
font.weight: Font.Medium
|
2024-05-27 17:37:22 +00:00
|
|
|
text: "Valid: %1".arg(slippageSelector.valid ? "true" : "false")
|
2024-05-27 13:13:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
Repeater {
|
2024-05-28 17:39:41 +00:00
|
|
|
model: [0, 0.1, 0.5, 0.24, 0.8, 120.84]
|
2024-05-27 13:13:02 +00:00
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "set " + modelData
|
2024-05-27 17:37:22 +00:00
|
|
|
onClicked: slippageSelector.value = modelData
|
2024-05-27 13:13:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-27 17:37:22 +00:00
|
|
|
Button {
|
|
|
|
text: "Reset defaults"
|
|
|
|
onClicked: slippageSelector.reset()
|
|
|
|
}
|
|
|
|
|
2024-05-27 13:13:02 +00:00
|
|
|
Item { Layout.fillHeight: true }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// category: Controls
|
|
|
|
|
|
|
|
// https://www.figma.com/design/TS0eQX9dAZXqZtELiwKIoK/Swap---Milestone-1?node-id=3409-257346&t=ENK93cK7GyTqEV8S-0
|
|
|
|
// https://www.figma.com/design/TS0eQX9dAZXqZtELiwKIoK/Swap---Milestone-1?node-id=3410-262441&t=ENK93cK7GyTqEV8S-0
|