From ead6737b87ee238aa0c7f81f9186c62f15ab8d67 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Mon, 4 Aug 2014 16:25:21 +0200 Subject: [Qt] format ping times in peers tab as ms - also align ping times to the right --- src/qt/peertablemodel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/qt/peertablemodel.cpp') diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index 4c650bdec9..54b46867ea 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -152,8 +152,7 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const CNodeCombinedStats *rec = static_cast(index.internalPointer()); - if(role == Qt::DisplayRole) - { + if (role == Qt::DisplayRole) { switch(index.column()) { case Address: @@ -163,7 +162,11 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const case Ping: return GUIUtil::formatPingTime(rec->nodeStats.dPingTime); } + } else if (role == Qt::TextAlignmentRole) { + if (index.column() == Ping) + return (int)(Qt::AlignRight | Qt::AlignVCenter); } + return QVariant(); } -- cgit v1.2.3