Skip to content
Snippets Groups Projects
Commit a88e12c9 authored by Evgenii Tagiltsev's avatar Evgenii Tagiltsev Committed by andrey.daragan
Browse files

Features 2605

parent c7dead42
No related branches found
No related tags found
1 merge request!11Cellframe clone
...@@ -99,6 +99,8 @@ QVariant DapScreenHistoryModel::data(const QModelIndex &index, int role) const ...@@ -99,6 +99,8 @@ QVariant DapScreenHistoryModel::data(const QModelIndex &index, int role) const
QDateTime currentTime = QDateTime::currentDateTime(); QDateTime currentTime = QDateTime::currentDateTime();
QDateTime itemDate = m_elementList.at(index.row()).Date; QDateTime itemDate = m_elementList.at(index.row()).Date;
if(currentTime.date() == itemDate.date()) return QString("Today"); if(currentTime.date() == itemDate.date()) return QString("Today");
else if(currentTime.daysTo(itemDate) == -1) return QString("Yesterday");
else if(currentTime.date().year() < itemDate.date().year()) return itemDate.toString(MASK_FOR_MODEL_WITH_YEAR);
return itemDate.toString(MASK_FOR_MODEL); return itemDate.toString(MASK_FOR_MODEL);
} }
case DisplayNameTokenRole: return m_elementList.at(index.row()).TokenName; case DisplayNameTokenRole: return m_elementList.at(index.row()).TokenName;
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
#include "DapHistoryType.h" #include "DapHistoryType.h"
#include "DapChainConvertor.h" #include "DapChainConvertor.h"
#define MASK_FOR_MODEL QString("MMMM, dd") #define MASK_FOR_MODEL QString("MMMM, d")
#define MASK_FOR_MODEL_WITH_YEAR QString("MMMM, d, yyyy")
class DapScreenHistoryModel : public QAbstractListModel class DapScreenHistoryModel : public QAbstractListModel
{ {
......
...@@ -48,3 +48,6 @@ DapUiQmlWidgetLastActionsForm { ...@@ -48,3 +48,6 @@ DapUiQmlWidgetLastActionsForm {
} }
} }
} }
...@@ -10,55 +10,52 @@ Component { ...@@ -10,55 +10,52 @@ Component {
height: 50 * pt height: 50 * pt
color: "transparent" color: "transparent"
Rectangle { RowLayout {
id: dapData anchors.fill: parent
width: childrenRect.width anchors.rightMargin: 20 * pt
height: childrenRect.height
Layout.alignment: Qt.AlignVCenter
anchors.left: dapContentDelegate.left
anchors.leftMargin: 16 * pt anchors.leftMargin: 16 * pt
anchors.top: parent.top
anchors.topMargin: 13
Column { ColumnLayout {
anchors.fill: parent Layout.fillHeight: true
Layout.fillWidth: true
spacing: 2 spacing: 2
Text { Text {
Layout.fillWidth: true
text: tokenName text: tokenName
color: "#5F5F63" color: "#3E3853"
font.family: "Roboto Regular" font.family: fontRobotoRegular.name
font.pixelSize: 14 * pt font.pixelSize: 14 * pt
elide: Text.ElideRight
} }
Text { Text {
Layout.fillWidth: true
text: txStatus text: txStatus
color: "#A7A7A7" color: "#757184"
font.family: "Roboto" font.family: fontRobotoRegular.name
font.pixelSize: 12 * pt font.pixelSize: 12 * pt
} }
} }
Text {
Layout.fillHeight: true
Layout.fillWidth: true
horizontalAlignment: Qt.AlignRight
verticalAlignment: Qt.AlignVCenter
color: "#3E3853"
text: cryptocurrency;
font.family: fontRobotoRegular.name
font.pixelSize: 12 * pt
}
} }
Text {
anchors.left: dapData.right
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.rightMargin: 20 * pt
horizontalAlignment: Qt.AlignRight
verticalAlignment: Qt.AlignVCenter
color: "#505559"
text: cryptocurrency;
font.family: "Roboto"
font.pixelSize: 14 * pt
}
Rectangle { Rectangle {
width: parent.width width: parent.width
height: 1 * pt height: 1
color: "#C7C9CC" color: "#E3E2E6"
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
} }
} }
......
import QtQuick 2.9 import QtQuick 2.9
import QtQml 2.12 import QtQml 2.9
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
......
...@@ -11,10 +11,7 @@ Rectangle { ...@@ -11,10 +11,7 @@ Rectangle {
color: "transparent" color: "transparent"
Row { Row {
anchors.top: parent.top anchors.fill: parent
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.right: statusBarAddWalletButton.left
anchors.leftMargin: 30 * pt anchors.leftMargin: 30 * pt
anchors.topMargin: 10 * pt anchors.topMargin: 10 * pt
anchors.bottomMargin: 10 * pt anchors.bottomMargin: 10 * pt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment