mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Merge pull request #318 from Cranken/highlightText
Now highlights the text in the channel change and tab rename dialogue.
This commit is contained in:
commit
10f0aadb6c
|
@ -40,6 +40,7 @@ NotebookTab::NotebookTab(Notebook *_notebook)
|
|||
d.setText("");
|
||||
} else {
|
||||
d.setText(this->getTitle());
|
||||
d.highlightText();
|
||||
}
|
||||
|
||||
if (d.exec() == QDialog::Accepted) {
|
||||
|
|
|
@ -190,6 +190,7 @@ bool Split::showChangeChannelPopup(const char *dialogTitle, bool empty)
|
|||
|
||||
if (!empty) {
|
||||
dialog.setText(this->channel->name);
|
||||
dialog.highlightText();
|
||||
}
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted) {
|
||||
|
|
|
@ -37,5 +37,10 @@ void TextInputDialog::cancelButtonClicked()
|
|||
close();
|
||||
}
|
||||
|
||||
void TextInputDialog::highlightText()
|
||||
{
|
||||
this->_lineEdit.selectAll();
|
||||
}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -27,6 +27,8 @@ public:
|
|||
_lineEdit.setText(text);
|
||||
}
|
||||
|
||||
void highlightText();
|
||||
|
||||
private:
|
||||
QVBoxLayout _vbox;
|
||||
QLineEdit _lineEdit;
|
||||
|
|
Loading…
Reference in a new issue