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("");
|
d.setText("");
|
||||||
} else {
|
} else {
|
||||||
d.setText(this->getTitle());
|
d.setText(this->getTitle());
|
||||||
|
d.highlightText();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d.exec() == QDialog::Accepted) {
|
if (d.exec() == QDialog::Accepted) {
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ bool Split::showChangeChannelPopup(const char *dialogTitle, bool empty)
|
|||||||
|
|
||||||
if (!empty) {
|
if (!empty) {
|
||||||
dialog.setText(this->channel->name);
|
dialog.setText(this->channel->name);
|
||||||
|
dialog.highlightText();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
|
|||||||
@@ -37,5 +37,10 @@ void TextInputDialog::cancelButtonClicked()
|
|||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextInputDialog::highlightText()
|
||||||
|
{
|
||||||
|
this->_lineEdit.selectAll();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace widgets
|
} // namespace widgets
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ public:
|
|||||||
_lineEdit.setText(text);
|
_lineEdit.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void highlightText();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QVBoxLayout _vbox;
|
QVBoxLayout _vbox;
|
||||||
QLineEdit _lineEdit;
|
QLineEdit _lineEdit;
|
||||||
|
|||||||
Reference in New Issue
Block a user