From 81515f5e6320bfb4956cad6824d99b88fe595b86 Mon Sep 17 00:00:00 2001
From: vtexier <vit@free.fr>
Date: Tue, 24 Mar 2020 09:52:56 +0100
Subject: [PATCH] [enh] add color legend below tx history

Change "to send" style from bold to italic
---
 .../gui/navigation/txhistory/table_model.py    |  6 ++----
 .../gui/navigation/txhistory/txhistory.ui      | 18 +++++++++---------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/sakia/gui/navigation/txhistory/table_model.py b/src/sakia/gui/navigation/txhistory/table_model.py
index 22bcc7e1..dae1eba1 100644
--- a/src/sakia/gui/navigation/txhistory/table_model.py
+++ b/src/sakia/gui/navigation/txhistory/table_model.py
@@ -425,7 +425,7 @@ class HistoryTableModel(QAbstractTableModel):
                 elif state_data == Transaction.REFUSED:
                     font.setItalic(True)
                 elif state_data == Transaction.TO_SEND:
-                    font.setBold(True)
+                    font.setItalic(True)
                 else:
                     font.setItalic(False)
             return font
@@ -441,9 +441,7 @@ class HistoryTableModel(QAbstractTableModel):
                     color = QColor(Qt.darkRed)
                 elif state_data == HistoryTableModel.DIVIDEND:
                     color = QColor(Qt.darkBlue)
-            if state_data == Transaction.AWAITING or (
-                state_data == Transaction.VALIDATED and current_confirmations == 0
-            ):
+            if state_data == Transaction.AWAITING:
                 color = QColor("#ffb000")
             if color:
                 if self.app.parameters.dark_theme:
diff --git a/src/sakia/gui/navigation/txhistory/txhistory.ui b/src/sakia/gui/navigation/txhistory/txhistory.ui
index 9d00b07f..5b8e6796 100644
--- a/src/sakia/gui/navigation/txhistory/txhistory.ui
+++ b/src/sakia/gui/navigation/txhistory/txhistory.ui
@@ -201,17 +201,17 @@
           <number>6</number>
          </property>
          <item>
-          <spacer name="horizontalSpacer_4">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
+          <widget class="QLabel" name="label">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
            </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
+           <property name="text">
+            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#0000ff;&quot;&gt;â– &lt;/span&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;to send &lt;/span&gt;&lt;span style=&quot; color:#ffb000;&quot;&gt;â– &lt;/span&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;pending &lt;/span&gt;&lt;span style=&quot; color:#808080;&quot;&gt;â– &lt;/span&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;refused &lt;/span&gt;&lt;span style=&quot; color:#000000;&quot;&gt;â–  &lt;/span&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;not confirmed &lt;/span&gt;&lt;span style=&quot; color:#000000;&quot;&gt;â– &lt;/span&gt; validated &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
            </property>
-          </spacer>
+          </widget>
          </item>
          <item>
           <widget class="QSpinBox" name="spin_page"/>
-- 
GitLab