mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge 39e306009b into merged_master (Bitcoin PR bitcoin-core/gui#271)
This commit is contained in:
commit
87cb26b9f4
2 changed files with 5 additions and 10 deletions
|
|
@ -503,7 +503,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||
ui->lineEdit->setMaxLength(16 * 1024 * 1024);
|
||||
ui->messagesWidget->installEventFilter(this);
|
||||
|
||||
connect(ui->clearButton, &QPushButton::clicked, this, &RPCConsole::clear);
|
||||
connect(ui->clearButton, &QPushButton::clicked, [this] { clear(); });
|
||||
connect(ui->fontBiggerButton, &QPushButton::clicked, this, &RPCConsole::fontBigger);
|
||||
connect(ui->fontSmallerButton, &QPushButton::clicked, this, &RPCConsole::fontSmaller);
|
||||
connect(ui->btnClearTrafficGraph, &QPushButton::clicked, ui->trafficGraph, &TrafficGraphWidget::clear);
|
||||
|
|
@ -771,20 +771,15 @@ void RPCConsole::setFontSize(int newSize)
|
|||
|
||||
// clear console (reset icon sizes, default stylesheet) and re-add the content
|
||||
float oldPosFactor = 1.0 / ui->messagesWidget->verticalScrollBar()->maximum() * ui->messagesWidget->verticalScrollBar()->value();
|
||||
clear(false);
|
||||
clear(/* keep_prompt */ true);
|
||||
ui->messagesWidget->setHtml(str);
|
||||
ui->messagesWidget->verticalScrollBar()->setValue(oldPosFactor * ui->messagesWidget->verticalScrollBar()->maximum());
|
||||
}
|
||||
|
||||
void RPCConsole::clear(bool clearHistory)
|
||||
void RPCConsole::clear(bool keep_prompt)
|
||||
{
|
||||
ui->messagesWidget->clear();
|
||||
if(clearHistory)
|
||||
{
|
||||
history.clear();
|
||||
historyPtr = 0;
|
||||
}
|
||||
ui->lineEdit->clear();
|
||||
if (!keep_prompt) ui->lineEdit->clear();
|
||||
ui->lineEdit->setFocus();
|
||||
|
||||
// Add smoothly scaled icon images.
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ private Q_SLOTS:
|
|||
void updateDetailWidget();
|
||||
|
||||
public Q_SLOTS:
|
||||
void clear(bool clearHistory = true);
|
||||
void clear(bool keep_prompt = false);
|
||||
void fontBigger();
|
||||
void fontSmaller();
|
||||
void setFontSize(int newSize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue