add focus to edit tag dialog
This commit is contained in:
parent
04ae1c54dd
commit
a0c279130e
2 changed files with 8 additions and 5 deletions
|
@ -24,7 +24,7 @@
|
||||||
<url type="donation">https://github.com/sponsors/martinrotter</url>
|
<url type="donation">https://github.com/sponsors/martinrotter</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="4.2.5" date="2022-10-18"/>
|
<release version="4.2.5" date="2022-10-21"/>
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.0">
|
<content_rating type="oars-1.0">
|
||||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||||
|
|
|
@ -21,14 +21,14 @@ FormAddEditLabel::FormAddEditLabel(QWidget* parent) : QDialog(parent), m_editabl
|
||||||
m_ui.m_txtName->setStatus(LineEditWithStatus::StatusType::Ok, tr("Perfect!"));
|
m_ui.m_txtName->setStatus(LineEditWithStatus::StatusType::Ok, tr("Perfect!"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
m_ui.m_txtName->lineEdit()->setText(tr("Hot stuff"));
|
|
||||||
m_ui.m_txtName->lineEdit()->setFocus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label* FormAddEditLabel::execForAdd() {
|
Label* FormAddEditLabel::execForAdd() {
|
||||||
GuiUtilities::applyDialogProperties(*this, qApp->icons()->fromTheme(QSL("tag-new")), tr("Create new label"));
|
GuiUtilities::applyDialogProperties(*this, qApp->icons()->fromTheme(QSL("tag-new")), tr("Create new label"));
|
||||||
|
|
||||||
m_ui.m_btnColor->setRandomColor();
|
m_ui.m_btnColor->setRandomColor();
|
||||||
|
m_ui.m_txtName->lineEdit()->setText(tr("Hot stuff"));
|
||||||
|
m_ui.m_txtName->setFocus();
|
||||||
|
|
||||||
auto exit_code = exec();
|
auto exit_code = exec();
|
||||||
|
|
||||||
|
@ -41,11 +41,14 @@ Label* FormAddEditLabel::execForAdd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FormAddEditLabel::execForEdit(Label* lbl) {
|
bool FormAddEditLabel::execForEdit(Label* lbl) {
|
||||||
GuiUtilities::applyDialogProperties(*this, qApp->icons()->fromTheme(QSL("tag-properties")), tr("Edit label '%1'").arg(lbl->title()));
|
GuiUtilities::applyDialogProperties(*this,
|
||||||
|
qApp->icons()->fromTheme(QSL("tag-properties")),
|
||||||
|
tr("Edit label '%1'").arg(lbl->title()));
|
||||||
|
|
||||||
m_editableLabel = lbl;
|
m_editableLabel = lbl;
|
||||||
m_ui.m_btnColor->setColor(lbl->color());
|
m_ui.m_btnColor->setColor(lbl->color());
|
||||||
m_ui.m_txtName->lineEdit()->setText(lbl->title());
|
m_ui.m_txtName->lineEdit()->setText(lbl->title());
|
||||||
|
m_ui.m_txtName->setFocus();
|
||||||
|
|
||||||
auto exit_code = exec();
|
auto exit_code = exec();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue