From a88e12c969aed297467ec47ba1638bc8eb334654 Mon Sep 17 00:00:00 2001
From: Evgenii Tagiltsev <evgenii.tagiltsev@demlabs.net>
Date: Thu, 5 Dec 2019 18:33:56 +0000
Subject: [PATCH] Features 2605

---
 .../DapScreenHistoryModel.cpp                 |  2 +
 CellFrameDashboardGUI/DapScreenHistoryModel.h |  3 +-
 .../LastAction/DapUiQmlWidgetLastActions.qml  |  3 +
 .../DapUiQmlWidgetLastActionsDelegateForm.qml | 55 +++++++++----------
 .../DapUiQmlWidgetLastActionsHeaderForm.qml   |  2 +-
 .../StatusBar/DapUiQmlWidgetStatusBar.qml     |  5 +-
 6 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/CellFrameDashboardGUI/DapScreenHistoryModel.cpp b/CellFrameDashboardGUI/DapScreenHistoryModel.cpp
index 2e87629..428b272 100644
--- a/CellFrameDashboardGUI/DapScreenHistoryModel.cpp
+++ b/CellFrameDashboardGUI/DapScreenHistoryModel.cpp
@@ -99,6 +99,8 @@ QVariant DapScreenHistoryModel::data(const QModelIndex &index, int role) const
             QDateTime currentTime = QDateTime::currentDateTime();
             QDateTime itemDate = m_elementList.at(index.row()).Date;
             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);
         }
         case DisplayNameTokenRole:      return m_elementList.at(index.row()).TokenName;
diff --git a/CellFrameDashboardGUI/DapScreenHistoryModel.h b/CellFrameDashboardGUI/DapScreenHistoryModel.h
index 5df298d..cb1b833 100644
--- a/CellFrameDashboardGUI/DapScreenHistoryModel.h
+++ b/CellFrameDashboardGUI/DapScreenHistoryModel.h
@@ -10,7 +10,8 @@
 #include "DapHistoryType.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
 {
diff --git a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActions.qml b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActions.qml
index 57853a3..a8141c6 100644
--- a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActions.qml
+++ b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActions.qml
@@ -48,3 +48,6 @@ DapUiQmlWidgetLastActionsForm {
         }
     }
 }
+
+
+
diff --git a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActionsDelegateForm.qml b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActionsDelegateForm.qml
index b6c9f37..864d299 100644
--- a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActionsDelegateForm.qml
+++ b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActionsDelegateForm.qml
@@ -10,55 +10,52 @@ Component {
         height: 50 * pt
         color: "transparent"
 
-        Rectangle {
-            id: dapData
-            width: childrenRect.width
-            height: childrenRect.height
-            Layout.alignment: Qt.AlignVCenter
-            anchors.left: dapContentDelegate.left
+        RowLayout {
+            anchors.fill: parent
+            anchors.rightMargin: 20 * pt
             anchors.leftMargin: 16 * pt
-            anchors.top: parent.top
-            anchors.topMargin: 13
 
-            Column {
-                anchors.fill: parent
+            ColumnLayout {
+                Layout.fillHeight: true
+                Layout.fillWidth: true
                 spacing: 2
 
                 Text {
+                    Layout.fillWidth: true
                     text: tokenName
-                    color: "#5F5F63"
-                    font.family: "Roboto Regular"
+                    color: "#3E3853"
+                    font.family: fontRobotoRegular.name
                     font.pixelSize: 14 * pt
+                    elide: Text.ElideRight
                 }
 
                 Text {
+                    Layout.fillWidth: true
                     text: txStatus
-                    color: "#A7A7A7"
-                    font.family: "Roboto"
+                    color: "#757184"
+                    font.family: fontRobotoRegular.name
                     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 {
             width: parent.width
-            height: 1 * pt
-            color: "#C7C9CC"
+            height: 1
+            color: "#E3E2E6"
             anchors.bottom: parent.bottom
         }
     }
diff --git a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActionsHeaderForm.qml b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActionsHeaderForm.qml
index a8a3b4b..e2118d1 100644
--- a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActionsHeaderForm.qml
+++ b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetLastActionsHeaderForm.qml
@@ -1,5 +1,5 @@
 import QtQuick 2.9
-import QtQml 2.12
+import QtQml 2.9
 import QtQuick.Controls 2.2
 import QtQuick.Layouts 1.12
 
diff --git a/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBar.qml b/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBar.qml
index eec214f..f4dde18 100644
--- a/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBar.qml
+++ b/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBar.qml
@@ -11,10 +11,7 @@ Rectangle {
         color: "transparent"
 
         Row {
-            anchors.top: parent.top
-            anchors.left: parent.left
-            anchors.bottom: parent.bottom
-            anchors.right: statusBarAddWalletButton.left
+            anchors.fill: parent
             anchors.leftMargin: 30 * pt
             anchors.topMargin: 10 * pt
             anchors.bottomMargin: 10 * pt
-- 
GitLab