|
| 1 | +import QtQuick 2.15 |
| 2 | +import QtQuick.Layouts 1.15 |
| 3 | +import QtQuick.Controls 2.15 |
| 4 | + |
| 5 | +import Qaterial 1.0 as Qaterial |
| 6 | + |
| 7 | +import Dex.Themes 1.0 as Dex |
| 8 | +import "../../Components" |
| 9 | +import "../../Constants" |
| 10 | + |
| 11 | +// OrderBook / Component import |
| 12 | +import "OrderBook/" as OrderBook |
| 13 | + |
| 14 | +// Best Order |
| 15 | +import "BestOrder/" as BestOrder |
| 16 | + |
| 17 | + |
| 18 | +ColumnLayout |
| 19 | +{ |
| 20 | + Layout.minimumWidth: 350 |
| 21 | + Layout.fillWidth: true |
| 22 | + Layout.fillHeight: true |
| 23 | + Layout.alignment: Qt.AlignTop |
| 24 | + property alias currentIndex: marketTabView.currentIndex |
| 25 | + |
| 26 | + Qaterial.LatoTabBar |
| 27 | + { |
| 28 | + id: marketTabView |
| 29 | + property int orderbook: 0 |
| 30 | + property int best_orders: 1 |
| 31 | + |
| 32 | + background: null |
| 33 | + Layout.leftMargin: 6 |
| 34 | + |
| 35 | + Qaterial.LatoTabButton |
| 36 | + { |
| 37 | + text: qsTr("Orderbook") |
| 38 | + font.pixelSize: 14 |
| 39 | + textColor: checked ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.foregroundColor2 |
| 40 | + textSecondaryColor: Dex.CurrentTheme.foregroundColor2 |
| 41 | + indicatorColor: Dex.CurrentTheme.foregroundColor |
| 42 | + } |
| 43 | + Qaterial.LatoTabButton |
| 44 | + { |
| 45 | + text: qsTr("Best Orders") |
| 46 | + font.pixelSize: 14 |
| 47 | + textColor: checked ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.foregroundColor2 |
| 48 | + textSecondaryColor: Dex.CurrentTheme.foregroundColor2 |
| 49 | + indicatorColor: Dex.CurrentTheme.foregroundColor |
| 50 | + } |
| 51 | + } |
| 52 | + |
| 53 | + Rectangle |
| 54 | + { |
| 55 | + Layout.fillHeight: true |
| 56 | + color: Dex.CurrentTheme.floatingBackgroundColor |
| 57 | + radius: 10 |
| 58 | + Layout.preferredWidth: 350 |
| 59 | + |
| 60 | + Qaterial.SwipeView |
| 61 | + { |
| 62 | + id: marketSwipeView |
| 63 | + clip: true |
| 64 | + interactive: false |
| 65 | + currentIndex: marketTabView.currentIndex |
| 66 | + anchors.fill: parent |
| 67 | + |
| 68 | + onCurrentIndexChanged: |
| 69 | + { |
| 70 | + marketSwipeView.currentItem.update(); |
| 71 | + } |
| 72 | + |
| 73 | + OrderBook.Vertical |
| 74 | + { |
| 75 | + id: orderBook |
| 76 | + Layout.fillHeight: true |
| 77 | + Layout.fillWidth: true |
| 78 | + } |
| 79 | + |
| 80 | + // Best Orders |
| 81 | + BestOrder.List |
| 82 | + { |
| 83 | + id: bestOrders |
| 84 | + Layout.fillHeight: true |
| 85 | + Layout.fillWidth: true |
| 86 | + } |
| 87 | + } |
| 88 | + } |
| 89 | +} |
0 commit comments