diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 2e29992c0e2..4bf661e92ad 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -486,8 +486,18 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty ui->openDebugLogfileButton->setIcon(platformStyle->SingleColorIcon(":/icons/export")); } ui->clearButton->setIcon(platformStyle->SingleColorIcon(":/icons/remove")); + ui->fontBiggerButton->setIcon(platformStyle->SingleColorIcon(":/icons/fontbigger")); + //: Main shortcut to increase the RPC console font size. + ui->fontBiggerButton->setShortcut(tr("Ctrl++")); + //: Secondary shortcut to increase the RPC console font size. + GUIUtil::AddButtonShortcut(ui->fontBiggerButton, tr("Ctrl+=")); + ui->fontSmallerButton->setIcon(platformStyle->SingleColorIcon(":/icons/fontsmaller")); + //: Main shortcut to decrease the RPC console font size. + ui->fontSmallerButton->setShortcut(tr("Ctrl+-")); + //: Secondary shortcut to decrease the RPC console font size. + GUIUtil::AddButtonShortcut(ui->fontSmallerButton, tr("Ctrl+_")); // Install event filter for up and down arrow ui->lineEdit->installEventFilter(this); @@ -816,14 +826,23 @@ void RPCConsole::clear(bool clearHistory) ).arg(fixedFontInfo.family(), QString("%1pt").arg(consoleFontSize)) ); - message(CMD_REPLY, (tr("Welcome to the %1 RPC console.").arg(PACKAGE_NAME) + "
" + - tr("Use up and down arrows to navigate history, and %1 to clear screen.").arg("" + ui->clearButton->shortcut().toString(QKeySequence::NativeText) + "") + "
" + - tr("Type %1 for an overview of available commands.").arg("help") + "
" + - tr("For more information on using this console type %1.").arg("help-console") + - "

" + - tr("WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command.") + - "
"), - true); + message(CMD_REPLY, + tr("Welcome to the %1 RPC console.").arg(PACKAGE_NAME) + + "
" + + tr("Use up and down arrows to navigate history, and %1 to clear screen.") + .arg("" + ui->clearButton->shortcut().toString(QKeySequence::NativeText) + "") + + "
" + + tr("Use %1 and %2 to increase or decrease the font size.") + .arg("" + ui->fontBiggerButton->shortcut().toString(QKeySequence::NativeText) + "") + .arg("" + ui->fontSmallerButton->shortcut().toString(QKeySequence::NativeText) + "") + + "
" + + tr("Type %1 for an overview of available commands.").arg("help") + + "
" + + tr("For more information on using this console type %1.").arg("help-console") + + "

" + + tr("WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command.") + + "
", + true); } void RPCConsole::keyPressEvent(QKeyEvent *event)