mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 20:36:58 +03:00
Merge pull request #292 from lack/offline_username_limits
Limit offline username to 16 characters with override
This commit is contained in:
parent
bf6fa6bce4
commit
ddda02f092
3 changed files with 23 additions and 0 deletions
|
|
@ -42,6 +42,15 @@ void OfflineLoginDialog::setUserInputsEnabled(bool enable)
|
|||
ui->buttonBox->setEnabled(enable);
|
||||
}
|
||||
|
||||
void OfflineLoginDialog::on_allowLongUsernames_stateChanged(int value)
|
||||
{
|
||||
if (value == Qt::Checked) {
|
||||
ui->userTextBox->setMaxLength(INT_MAX);
|
||||
} else {
|
||||
ui->userTextBox->setMaxLength(16);
|
||||
}
|
||||
}
|
||||
|
||||
// Enable the OK button only when the textbox contains something.
|
||||
void OfflineLoginDialog::on_userTextBox_textEdited(const QString &newText)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue