mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
[users] Use tooltips
- the explanations under and around the boxes is noisy, hard to size correctly (viz. issue #1202) - use tooltips in almost-all fields instead - add placeholder text to be more suggestive
This commit is contained in:
parent
b3765bc144
commit
9ee0609b72
2 changed files with 49 additions and 66 deletions
|
@ -88,7 +88,6 @@ UsersPage::UsersPage( QWidget* parent )
|
|||
} );
|
||||
connect( ui->checkBoxReusePassword, &QCheckBox::stateChanged, this, [this]( int checked ) {
|
||||
ui->labelChooseRootPassword->setVisible( !checked );
|
||||
ui->labelExtraRootPassword->setVisible( !checked );
|
||||
ui->labelRootPassword->setVisible( !checked );
|
||||
ui->labelRootPasswordError->setVisible( !checked );
|
||||
ui->textBoxRootPassword->setVisible( !checked );
|
||||
|
@ -105,24 +104,21 @@ UsersPage::UsersPage( QWidget* parent )
|
|||
|
||||
setPasswordCheckboxVisible( false );
|
||||
|
||||
// Don't expand the explanations to "stupid wide", but keep them vaguely as-wide-as
|
||||
// the things they are explaining.
|
||||
int boxWidth
|
||||
= qMax( qMax( ui->textBoxUsername->width(), ui->textBoxHostname->width() ), ui->textBoxUserPassword->width() );
|
||||
ui->username_extra_label_2->setMaximumWidth( 3 * boxWidth );
|
||||
ui->hostname_extra_label_2->setMaximumWidth( 3 * boxWidth );
|
||||
ui->password_extra_label_3->setMaximumWidth( 3 * boxWidth );
|
||||
|
||||
CALAMARES_RETRANSLATE(
|
||||
ui->retranslateUi( this ); if ( Calamares::Settings::instance()->isSetupMode() ) {
|
||||
ui->username_extra_label_2->setText( tr( "<small>If more than one person will "
|
||||
ui->retranslateUi( this );
|
||||
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||
{
|
||||
ui->textBoxUsername->setToolTip( tr( "<small>If more than one person will "
|
||||
"use this computer, you can create multiple "
|
||||
"accounts after setup.</small>" ) );
|
||||
} else {
|
||||
ui->username_extra_label_2->setText( tr( "<small>If more than one person will "
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->textBoxUsername->setToolTip( tr( "<small>If more than one person will "
|
||||
"use this computer, you can create multiple "
|
||||
"accounts after installation.</small>" ) );
|
||||
} )
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue