Skip to content

Commit

Permalink
Sugarchain: Settings Part 7
Browse files Browse the repository at this point in the history
Changes:
- GUI: Show seconds TX time on QT GUI
  * sugarchain-project/sugarchain@4cc71bb
- GUI: Do not display in GB on QT GUI
- GUI: UI height on QT GUI
  • Loading branch information
decryp2kanon committed Nov 6, 2020
1 parent 6885ee9 commit b17117d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/qt/forms/helpmessagedialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>780</width>
<height>400</height>
<height>440</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
Expand Down
2 changes: 1 addition & 1 deletion src/qt/forms/intro.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>674</width>
<height>415</height>
<height>474</height>
</rect>
</property>
<property name="windowTitle">
Expand Down
6 changes: 5 additions & 1 deletion src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace GUIUtil {

QString dateTimeStr(const QDateTime &date)
{
return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm");
return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm:ss"); // Sugarchain Settings // Show seconds TX time on QT GUI
}

QString dateTimeStr(qint64 nTime)
Expand Down Expand Up @@ -835,10 +835,14 @@ QString formatBytes(uint64_t bytes)
return QString(QObject::tr("%1 B")).arg(bytes);
if(bytes < 1024 * 1024)
return QString(QObject::tr("%1 KB")).arg(bytes / 1024);
// Sugarchain Settings: Do not display in GB on QT GUI
/*
if(bytes < 1024 * 1024 * 1024)
return QString(QObject::tr("%1 MB")).arg(bytes / 1024 / 1024);
return QString(QObject::tr("%1 GB")).arg(bytes / 1024 / 1024 / 1024);
*/
return QString(QObject::tr("%1 MB")).arg(bytes / 1024 / 1024);
}

qreal calculateIdealFontSize(int width, const QString& text, QFont font, qreal minPointSize, qreal font_size) {
Expand Down
2 changes: 1 addition & 1 deletion src/qt/receivecoinsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ReceiveCoinsDialog : public QDialog

public:
enum ColumnWidths {
DATE_COLUMN_WIDTH = 130,
DATE_COLUMN_WIDTH = 139, // Sugarchain Settings // Show seconds TX time on QT GUI
LABEL_COLUMN_WIDTH = 120,
AMOUNT_MINIMUM_COLUMN_WIDTH = 180,
MINIMUM_COLUMN_WIDTH = 130
Expand Down
4 changes: 2 additions & 2 deletions src/qt/transactionview.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ class TransactionView : public QWidget
enum ColumnWidths {
STATUS_COLUMN_WIDTH = 30,
WATCHONLY_COLUMN_WIDTH = 23,
DATE_COLUMN_WIDTH = 120,
DATE_COLUMN_WIDTH = 139, // Sugarchain Settings // Show seconds TX time on QT GUI
TYPE_COLUMN_WIDTH = 113,
AMOUNT_MINIMUM_COLUMN_WIDTH = 120,
AMOUNT_MINIMUM_COLUMN_WIDTH = 139, // Sugarchain Settings // Show seconds TX time on QT GUI
MINIMUM_COLUMN_WIDTH = 23
};

Expand Down

0 comments on commit b17117d

Please sign in to comment.