Merge pull request #318 from Cranken/highlightText
Now highlights the text in the channel change and tab rename dialogue.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user