From 6a0185480884abb9324cae01741d6d4f5f393cbf Mon Sep 17 00:00:00 2001 From: kornelHub <67650984+kornelHub@users.noreply.github.com> Date: Sun, 14 Feb 2021 14:08:22 +0100 Subject: [PATCH] locked transaction widget size to 450 --- pages/summary_page.py | 15 +++++++-------- ui/summary_page.ui | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/pages/summary_page.py b/pages/summary_page.py index 09b6cb3..fd0c046 100644 --- a/pages/summary_page.py +++ b/pages/summary_page.py @@ -28,7 +28,7 @@ def format_and_dislay_text(self, trades_dict): if trades_dict['buy_trades'][1]['index'] < trades_dict['sell_trades'][1]['index']: #first trans is buy # formatted_trades += 'Traded' for x in range(len(trades_dict['sell_trades'])-1): - formatted_trades += '-------------------------------------------------------------------------\n' + formatted_trades += '----------------------------------------------------------------------------\n' formatted_trades += '{}) BOUGHT {} for price {}\n' \ .format(trades_dict['buy_trades'][x+1]['index'], trades_dict['buy_trades'][x+1]['amount_traded'], @@ -38,20 +38,19 @@ def format_and_dislay_text(self, trades_dict): trades_dict['sell_trades'][x+1]['amount_traded'], trades_dict['sell_trades'][x+1]['price']) formatted_trades += '#PROFIT: {}\n' \ - .format( - trades_dict['sell_trades'][x+1]['currency_2'] - trades_dict['sell_trades'][x]['currency_2'] - - trades_dict['sell_trades'][x]['currency_1'] * trades_dict['sell_trades'][x]['price']) + .format(trades_dict['sell_trades'][x+1]['currency_2'] - trades_dict['sell_trades'][x]['currency_2'] + - trades_dict['sell_trades'][x]['currency_1'] * trades_dict['sell_trades'][x]['price']) else: #first trans is sell - formatted_trades += '-------------------------------------------------------------------------\n' + formatted_trades += '----------------------------------------------------------------------------\n' formatted_trades += '{}) SOLD {} for price {}\n'\ .format(trades_dict['sell_trades'][1]['index'], trades_dict['sell_trades'][1]['amount_traded'], trades_dict['sell_trades'][1]['price']) formatted_trades += '#PROFIT: {}\n'\ .format(trades_dict['sell_trades'][1]['currency_2'] - trades_dict['sell_trades'][0]['currency_2'] - - trades_dict['sell_trades'][0]['currency_1'] * trades_dict['sell_trades'][0]['price']) + - trades_dict['sell_trades'][0]['currency_1'] * trades_dict['sell_trades'][0]['price']) for x in range(len(trades_dict['sell_trades'])-2): - formatted_trades += '-------------------------------------------------------------------------\n' + formatted_trades += '----------------------------------------------------------------------------\n' formatted_trades += '{}) BOUGHT {} for price {}\n'\ .format(trades_dict['buy_trades'][x+1]['index'], trades_dict['buy_trades'][x+1]['amount_traded'], @@ -62,7 +61,7 @@ def format_and_dislay_text(self, trades_dict): trades_dict['sell_trades'][x+2]['price']) formatted_trades += '#PROFIT: {}\n'\ .format(trades_dict['sell_trades'][x+2]['currency_2'] - trades_dict['sell_trades'][x+1]['currency_2'] - - trades_dict['sell_trades'][x+1]['currency_1'] * trades_dict['sell_trades'][x+1]['price']) + - trades_dict['sell_trades'][x+1]['currency_1'] * trades_dict['sell_trades'][x+1]['price']) self.textBrowser.setText(formatted_trades) diff --git a/ui/summary_page.ui b/ui/summary_page.ui index b0961e2..4a405a4 100644 --- a/ui/summary_page.ui +++ b/ui/summary_page.ui @@ -34,6 +34,18 @@ + + + 450 + 0 + + + + + 450 + 16777215 + + 0 @@ -134,6 +146,18 @@ border-radius: 10px; + + + 0 + 0 + + + + + 16777215 + 16777215 + + font: 10pt "MS Shell Dlg 2"; border-radius: 10px;