mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
qt: Do not clear console prompt when font resizing
This commit is contained in:
parent
d2cc339005
commit
7962e0dde8
2 changed files with 4 additions and 4 deletions
|
@ -776,15 +776,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();
|
||||
clear(/* keep_prompt */ true);
|
||||
ui->messagesWidget->setHtml(str);
|
||||
ui->messagesWidget->verticalScrollBar()->setValue(oldPosFactor * ui->messagesWidget->verticalScrollBar()->maximum());
|
||||
}
|
||||
|
||||
void RPCConsole::clear()
|
||||
void RPCConsole::clear(bool keep_prompt)
|
||||
{
|
||||
ui->messagesWidget->clear();
|
||||
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();
|
||||
void clear(bool keep_prompt = false);
|
||||
void fontBigger();
|
||||
void fontSmaller();
|
||||
void setFontSize(int newSize);
|
||||
|
|
Loading…
Add table
Reference in a new issue