aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qt/addresstablemodel.cpp2
-rw-r--r--src/qt/guiutil.cpp4
-rw-r--r--src/qt/guiutil.h4
-rw-r--r--src/qt/rpcconsole.cpp12
-rw-r--r--src/qt/rpcconsole.h1
-rw-r--r--src/qt/sendcoinsentry.cpp2
-rw-r--r--src/qt/signverifymessagedialog.cpp4
7 files changed, 18 insertions, 11 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp
index c5ac07cfc2..a488d298c4 100644
--- a/src/qt/addresstablemodel.cpp
+++ b/src/qt/addresstablemodel.cpp
@@ -218,7 +218,7 @@ QVariant AddressTableModel::data(const QModelIndex &index, int role) const
QFont font;
if(index.column() == Address)
{
- font = GUIUtil::bitcoinAddressFont();
+ font = GUIUtil::fixedPitchFont();
}
return font;
}
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 8917f77f22..1c0056a7bd 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -88,7 +88,7 @@ QString dateTimeStr(qint64 nTime)
return dateTimeStr(QDateTime::fromTime_t((qint32)nTime));
}
-QFont bitcoinAddressFont()
+QFont fixedPitchFont()
{
QFont font("Monospace");
#if QT_VERSION >= 0x040800
@@ -103,7 +103,7 @@ void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
{
parent->setFocusProxy(widget);
- widget->setFont(bitcoinAddressFont());
+ widget->setFont(fixedPitchFont());
#if QT_VERSION >= 0x040700
// We don't want translators to use own addresses in translations
// and this is the only place, where this address is supplied.
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 0ac3db6327..ec678c4af2 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -37,8 +37,8 @@ namespace GUIUtil
QString dateTimeStr(const QDateTime &datetime);
QString dateTimeStr(qint64 nTime);
- // Render Bitcoin addresses in monospace font
- QFont bitcoinAddressFont();
+ // Return a monospace font
+ QFont fixedPitchFont();
// Set up widgets for address and amounts
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent);
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index f387a3ec8c..5be750772f 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -462,13 +462,19 @@ void RPCConsole::clear()
}
// Set default style sheet
+ QFontInfo fixedFontInfo(GUIUtil::fixedPitchFont());
+ // Try to make font equally large on different OS.
+ QString ptSize = QString("%1pt").arg(QFontInfo(QFont()).pointSize());
ui->messagesWidget->document()->setDefaultStyleSheet(
+ QString(
"table { }"
"td.time { color: #808080; padding-top: 3px; } "
+ "td.message { font-family: %1; font-size: %2; white-space:pre-wrap; } "
"td.cmd-request { color: #006060; } "
"td.cmd-error { color: red; } "
"b { color: #006060; } "
- );
+ ).arg(fixedFontInfo.family(), ptSize)
+ );
message(CMD_REPLY, (tr("Welcome to the Bitcoin Core RPC console.") + "<br>" +
tr("Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.") + "<br>" +
@@ -494,7 +500,7 @@ void RPCConsole::message(int category, const QString &message, bool html)
if(html)
out += message;
else
- out += GUIUtil::HtmlEscape(message, true);
+ out += GUIUtil::HtmlEscape(message, false);
out += "</td></tr></table>";
ui->messagesWidget->append(out);
}
@@ -849,4 +855,4 @@ void RPCConsole::showOrHideBanTableIfRequired()
bool visible = clientModel->getBanTableModel()->shouldShow();
ui->banlistWidget->setVisible(visible);
ui->banHeading->setVisible(visible);
-} \ No newline at end of file
+}
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index b86f776786..d5932ff149 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -71,6 +71,7 @@ private Q_SLOTS:
public Q_SLOTS:
void clear();
+ /** Append the message to the message widget */
void message(int category, const QString &message, bool html = false);
/** Set number of connections shown in the UI */
void setNumConnections(int count);
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index 44aa8ad1af..4f4b5b70d5 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -40,7 +40,7 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *pare
// normal bitcoin address field
GUIUtil::setupAddressWidget(ui->payTo, this);
// just a label for displaying bitcoin address(es)
- ui->payTo_is->setFont(GUIUtil::bitcoinAddressFont());
+ ui->payTo_is->setFont(GUIUtil::fixedPitchFont());
// Connect signals
connect(ui->payAmount, SIGNAL(valueChanged()), this, SIGNAL(payAmountChanged()));
diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp
index 60e8e36ebe..96f50a2656 100644
--- a/src/qt/signverifymessagedialog.cpp
+++ b/src/qt/signverifymessagedialog.cpp
@@ -51,8 +51,8 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(const PlatformStyle *platformSt
ui->messageIn_VM->installEventFilter(this);
ui->signatureIn_VM->installEventFilter(this);
- ui->signatureOut_SM->setFont(GUIUtil::bitcoinAddressFont());
- ui->signatureIn_VM->setFont(GUIUtil::bitcoinAddressFont());
+ ui->signatureOut_SM->setFont(GUIUtil::fixedPitchFont());
+ ui->signatureIn_VM->setFont(GUIUtil::fixedPitchFont());
}
SignVerifyMessageDialog::~SignVerifyMessageDialog()