Commit 68732c3f authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Put the labels above the input fields

Putting the labels above the input fields makes the dialog also work with
large magnification. Additionally, we put the error label above the
input field (but below the label).

GnuPG-bug-id: 5916
parent 689e2e16
......@@ -83,8 +83,7 @@ public:
: i18n("Enter a name and/or an email address to use for the user ID.");
mainLayout->addWidget(new QLabel{infoText, q});
auto gridLayout = new QGridLayout;
int row = -1;
mainLayout->addWidget(new KSeparator{Qt::Horizontal, q});
{
ui.nameInput = FormTextInput<QLineEdit>::create(q);
......@@ -112,11 +111,9 @@ public:
"or it does not follow your organization's rules."));
}
row++;
gridLayout->addWidget(ui.nameInput->label(), row, 0, 1, 1);
gridLayout->addWidget(ui.nameInput->widget(), row, 1, 1, 1);
row++;
gridLayout->addWidget(ui.nameInput->errorLabel(), row, 0, 1, 2);
mainLayout->addWidget(ui.nameInput->label());
mainLayout->addWidget(ui.nameInput->errorLabel());
mainLayout->addWidget(ui.nameInput->widget());
}
connect(ui.nameInput->widget(), &QLineEdit::textChanged,
q, [this]() { updateResultLabel(); });
......@@ -139,17 +136,13 @@ public:
"or it does not follow your organization's rules."));
}
row++;
gridLayout->addWidget(ui.emailInput->label(), row, 0, 1, 1);
gridLayout->addWidget(ui.emailInput->widget(), row, 1, 1, 1);
row++;
gridLayout->addWidget(ui.emailInput->errorLabel(), row, 0, 1, 2);
mainLayout->addWidget(ui.emailInput->label());
mainLayout->addWidget(ui.emailInput->errorLabel());
mainLayout->addWidget(ui.emailInput->widget());
}
connect(ui.emailInput->widget(), &QLineEdit::textChanged,
q, [this]() { updateResultLabel(); });
mainLayout->addLayout(gridLayout);
mainLayout->addWidget(new KSeparator{Qt::Horizontal, q});
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment