diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-11-04 13:03:50 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-11-04 13:06:14 +0100 |
commit | c702521a85640d1972c982879efcb2cb0f897692 (patch) | |
tree | 4af243a646e02c6b41263f2ce469610e227513bd /src/qt/rpcconsole.cpp | |
parent | 8a95a18562b2be0b738ec5dd36670c8098c5f255 (diff) | |
parent | 268b79ef0c54a3bff0b50e093b98b943e49a4939 (diff) | |
download | bitcoin-c702521a85640d1972c982879efcb2cb0f897692.tar.xz |
Merge pull request #6864
268b79e [qt] rpcconsole: Scale monospace font to 95% (MarcoFalke)
28313b8 [qt] Use fixed pitch font for the rpc console (MarcoFalke)
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r-- | src/qt/rpcconsole.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index f387a3ec8c..8401701821 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 fixed font adequately large on different OS + QString ptSize = QString("%1pt").arg(QFontInfo(QFont()).pointSize() * 8.5 / 9); 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 +} |