Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new dex view design #1561

Merged
merged 51 commits into from Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4a860d3
Merge remote-tracking branch 'origin/dev' into dex_new_design
Jan 16, 2022
26e271c
Revert "Revert "Update orderbook style in pro view""
Jan 17, 2022
36d2392
Revert "Revert "Update orderbook style in pro view""
Jan 17, 2022
02bd4d7
Revert "Revert "Update pro trading view style""
Jan 17, 2022
bc9e629
Update pro view
Jan 19, 2022
f6436f8
Update pro view
Jan 19, 2022
07a9e1b
Update pro view style
Jan 19, 2022
034e5cd
Update pro view
Jan 20, 2022
401e7b3
Update pro view
Jan 20, 2022
720c65e
Update pro view
Jan 27, 2022
4be2b35
Update pro view
Jan 31, 2022
9ae6cbd
Update pro view
Jan 31, 2022
55c8682
Pro Trading View: Change orders/history style
Feb 6, 2022
77b79ab
mm2: Change how my_orders_answer and order_swaps_data are parsed
Feb 6, 2022
54d9a09
QML Components: Update SwapIcon properties
Feb 7, 2022
1503249
Pro Trading View: Update orders/history style
Feb 7, 2022
e7320fd
Pro Trading View: Update header style and some margins
Feb 7, 2022
5b22473
QML Components: Allow access to DexPaginator combobox
Feb 7, 2022
20f0a91
QML Components: Change DexPaginator style
Feb 7, 2022
b8d4ec3
Pro Trading View: Update orders/history style
Feb 7, 2022
3fc4e6a
Pro Trading View: Fix qml error
Feb 15, 2022
96d1900
Pro Trading View: Remove default size from market mode but selector comp
Feb 15, 2022
dd256e5
Pro Trading View: Update place order form style
Feb 15, 2022
42dccc3
Trading: Reduce lag when switching simple and pro views
Feb 21, 2022
aed22c0
Trading View: Update style and add chart to pro view
Feb 22, 2022
bd32f44
Pro Trading View: Arrange layout
Feb 22, 2022
95365ed
Pro Trading View: Fix orders/history line cut by the scrollbar
Feb 22, 2022
2e64649
Merge branch 'dev' into dex_new_design
smk762 Feb 22, 2022
1770af4
Merge remote-tracking branch 'origin/dev' into dex_new_design
Mar 9, 2022
8433d90
Fix qml error
Mar 9, 2022
cee80c8
Remove useless QML variable
Mar 9, 2022
3c5c0f9
Pro Trading View: Rework best orders code
Mar 11, 2022
018d24a
Pro Trading View: Update layout
Mar 11, 2022
9668372
Remove unused qml files
Mar 14, 2022
17970ea
Pro Trading View: Move orderbook warning sign from line to tooltip
Mar 14, 2022
c129753
Merge pull request #1676 from KomodoPlatform/pro_trade_view_orderbook…
Mar 16, 2022
8000807
Pro Trading View: Fix: Best orders was not showing any row
Mar 16, 2022
6dfbdac
Pro Trading View: Update best orders style
Mar 16, 2022
3690319
Merge remote-tracking branch 'origin/dev' into dex_new_design
Mar 16, 2022
f6a5307
Refactor qml folder
Mar 16, 2022
e75661d
QML Components: Create Widget component
Mar 17, 2022
32a496d
Remove duplicate bignumber.js submodule
Mar 18, 2022
e018285
Pro Trading View: Each panel (except ticker selector) is now a widget
Mar 21, 2022
12f4c91
Pro Trading View: Add options menu to hide items
Mar 21, 2022
076541e
Pro Trading View: Update layout
Mar 21, 2022
83782f1
Pro Trading View: Update orders/history tab style
Mar 25, 2022
4eaa037
Pro Tradig View: Add a setting to hide chart and ticker selectors
Mar 25, 2022
fa47589
Pro Trading View: Update layout
Mar 25, 2022
54a94df
Pro Trading View Fix: Obscure ellipses in light theme
Mar 25, 2022
9104824
Pro Trading View: Update colors
Mar 25, 2022
71b238a
Pro Trading View Fix: QML Warning + show place order form in case it'…
Mar 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
55 changes: 55 additions & 0 deletions atomic_defi_design/Dex/Components/CheckEye.qml
@@ -0,0 +1,55 @@
import QtQuick 2.15
import QtQuick.Layouts 1.12

import Qaterial 1.0 as Qaterial

import App 1.0
import Dex.Themes 1.0 as Dex

Item
{
id: control

property alias text: _label.text
property alias iconSource: _icon.source
property var target

width: parent.width
height: row.height

RowLayout
{
id: row
width: parent.width - 20
spacing: 10

Qaterial.ColorIcon
{
id: _icon
Layout.alignment: Qt.AlignVCenter
source: target.visible ? Qaterial.Icons.eyeOutline : Qaterial.Icons.eyeOffOutline
color: target.visible ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.buttonTextDisabledColor
iconSize: 17
}

DefaultText
{
id: _label
font.pixelSize: 15
text: ""
color: target.visible ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.buttonTextDisabledColor
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
}
}

DefaultMouseArea
{
anchors.fill: parent
onClicked:
{
if (target.visible) target.visible = false
else target.visible = true
}
}
}
54 changes: 0 additions & 54 deletions atomic_defi_design/Dex/Components/DexCheckEye.qml

This file was deleted.

7 changes: 6 additions & 1 deletion atomic_defi_design/Dex/Components/DexComboBox.qml
Expand Up @@ -48,8 +48,11 @@ ComboBox
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 13
width: parent.width - anchors.leftMargin

font: DexTypo.subtitle2
text_value: control.mainLineText
elide: Text.ElideRight
}
}

Expand Down Expand Up @@ -119,10 +122,12 @@ ComboBox
width: control.width
highlighted: control.highlightedIndex === index

contentItem: DexLabel
contentItem: DefaultText
{
width: control.width
font: DexTypo.subtitle2
text_value: control.dropdownLineText(model)
elide: Text.ElideRight
}
}

Expand Down
14 changes: 11 additions & 3 deletions atomic_defi_design/Dex/Components/DexPaginator.qml
Expand Up @@ -17,6 +17,8 @@ RowLayout
property var pageSize: Constants.API.app.orders_mdl.nb_pages
property var currentValue: Constants.API.app.orders_mdl.current_page

property alias itemsPerPageComboBox: itemsPerPageComboBox

function refreshBtn()
{
currentValue = Constants.API.app.orders_mdl.current_page
Expand Down Expand Up @@ -70,11 +72,15 @@ RowLayout

DefaultComboBox
{
id: itemsPerPageComboBox

readonly property int item_count: Constants.API.app.orders_mdl.limit_nb_elements
readonly property
var options: [5, 10, 25, 50, 100, 200]

Layout.preferredWidth: (root.width / 100) * 14
Layout.maximumWidth: 62
Layout.preferredHeight: 35
Layout.alignment: Qt.AlignLeft

model: options
Expand All @@ -84,10 +90,12 @@ RowLayout

DefaultText
{
Layout.preferredWidth: (root.width / 100) * 10
Layout.preferredWidth: (root.width / 100) * 16
Layout.leftMargin: 20
Layout.alignment: Qt.AlignLeft
font.pixelSize: 11
text_value: qsTr("items per page")
font.pixelSize: 12
text: qsTr("items per page")
color: Dex.CurrentTheme.foregroundColor2
}

Item
Expand Down
3 changes: 2 additions & 1 deletion atomic_defi_design/Dex/Components/SwapIcon.qml
Expand Up @@ -11,6 +11,7 @@ Item
property string top_arrow_ticker
property string bottom_arrow_ticker
property bool hovered: false
property color color: Dex.CurrentTheme.foregroundColor

implicitWidth: 20
implicitHeight: 50
Expand All @@ -19,6 +20,6 @@ Item
{
anchors.centerIn: parent
source: Qaterial.Icons.swapHorizontal
color: Dex.CurrentTheme.foregroundColor
color: root.color
}
}
108 changes: 108 additions & 0 deletions atomic_defi_design/Dex/Components/Widget.qml
@@ -0,0 +1,108 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.12

import Qaterial 1.0 as Qaterial

import Dex.Themes 1.0 as Dex
import "../Constants"

Item
{
id: root

property string title: "Widget"

property bool collapsable: true
property bool collapsedAtConstruction: false

property alias header: headerLoader.sourceComponent
property alias background: backgroundLoader.sourceComponent

property int margins: 10
property int spacing: 10
property int contentSpacing: 10

default property alias contentData: content.data

property bool _collapsed: collapsable && collapsedAtConstruction

function isCollapsed() { return _collapsed }

// Background
Loader
{
id: backgroundLoader
anchors.fill: parent
sourceComponent: defaultBackground
}

Column
{
anchors.fill: parent
anchors.margins: root.margins

spacing: root.spacing

// Header
Loader
{
id: headerLoader
sourceComponent: defaultHeader
width: parent.width
}

// Content
ColumnLayout
{
id: content

visible: !root._collapsed

width: parent.width
height: parent.height - y

spacing: root.contentSpacing
}
}

// Header Component
Component
{
id: defaultHeader

RowLayout
{
DefaultText { text: root.title; font: DexTypo.subtitle1 }
Item { Layout.fillWidth: true }
Qaterial.Icon
{
visible: root.collapsable
width: 20
height: 20
color: collapseButMouseArea.containsMouse ? Dex.CurrentTheme.foregroundColor2 : Dex.CurrentTheme.foregroundColor
icon: root._collapsed ? Qaterial.Icons.chevronUp : Qaterial.Icons.chevronDown

DefaultMouseArea
{
id: collapseButMouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: root._collapsed = !root._collapsed
}
}
}
}

// Background Component
Component
{
id: defaultBackground

Rectangle
{
radius: 10
color: Dex.CurrentTheme.floatingBackgroundColor
}
}
}
9 changes: 9 additions & 0 deletions atomic_defi_design/Dex/Constants/DexTypo.qml
Expand Up @@ -8,7 +8,9 @@ import App 1.0 as App

QtObject {
id: _font

property real fontDensity: 1.0

property real languageDensity: {
switch (App.API.app.settings_pg.lang) {
case "en":
Expand All @@ -24,6 +26,7 @@ QtObject {
}
}
property string fontFamily: "Ubuntu"

property font head1: Qt.font({
pixelSize: 96 * fontDensity,
letterSpacing: -1.5,
Expand Down Expand Up @@ -109,6 +112,12 @@ QtObject {
family: fontFamily,
weight: Font.Normal
})
property font subtitle3: Qt.font({
pixelSize: 16 * fontDensity,
letterSpacing: 0.1,
family: fontFamily,
weight: 500
})
property font monoSpace: Qt.font({
pixelSize: 14 * fontDensity,
letterSpacing: 0,
Expand Down
19 changes: 2 additions & 17 deletions atomic_defi_design/Dex/Exchange/Exchange.qml
Expand Up @@ -28,24 +28,9 @@ Item

Component.onDestruction: API.app.trading_pg.on_gui_leave_dex()

ColumnLayout
Trade
{
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter

id: trade
anchors.fill: parent
anchors.topMargin: 20

spacing: layout_margin

Trade
{
id: trade
Layout.fillWidth: true
Layout.fillHeight: true
Layout.bottomMargin: layout_margin
Layout.rightMargin: Layout.bottomMargin
}

}
}
15 changes: 0 additions & 15 deletions atomic_defi_design/Dex/Exchange/History/History.qml

This file was deleted.

15 changes: 0 additions & 15 deletions atomic_defi_design/Dex/Exchange/Orders/Orders.qml

This file was deleted.