diff --git a/src/widget/form/removefrienddialog.ui b/src/widget/form/removefrienddialog.ui
index f7f1c564e..3f92e054d 100644
--- a/src/widget/form/removefrienddialog.ui
+++ b/src/widget/form/removefrienddialog.ui
@@ -7,9 +7,15 @@
0
0
300
- 180
+ 110
+
+
+ 300
+ 110
+
+
Remove friend
@@ -27,19 +33,6 @@
- -
-
-
-
-
-
- Qt::AlignCenter
-
-
- YES
-
-
-
-
@@ -53,7 +46,7 @@
Qt::Horizontal
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+ QDialogButtonBox::No|QDialogButtonBox::Yes
diff --git a/src/widget/tool/removefrienddialog.cpp b/src/widget/tool/removefrienddialog.cpp
index 3d3f39bea..106f3e3a7 100644
--- a/src/widget/tool/removefrienddialog.cpp
+++ b/src/widget/tool/removefrienddialog.cpp
@@ -9,10 +9,7 @@ RemoveFriendDialog::RemoveFriendDialog(QWidget *parent, const Friend *f)
setAttribute(Qt::WA_QuitOnClose, false);
ui.setupUi(this);
ui.label->setText(ui.label->text().replace("<name>", f->getDisplayedName()));
- auto removeButton = ui.buttonBox->button(QDialogButtonBox::Ok);
- removeButton->setEnabled(false);
- removeButton->setText(tr("Remove"));
- connect(ui.yes, &QLineEdit::textChanged, this, &RemoveFriendDialog::onTextChanged);
+ adjustSize();
connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &RemoveFriendDialog::onAccepted);
connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &RemoveFriendDialog::close);
setFocus();
@@ -23,9 +20,3 @@ void RemoveFriendDialog::onAccepted()
_accepted = true;
close();
}
-
-void RemoveFriendDialog::onTextChanged(QString text)
-{
- ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(text == ui.yes->placeholderText());
-}
-
diff --git a/src/widget/tool/removefrienddialog.h b/src/widget/tool/removefrienddialog.h
index 00421f34e..4f99ccb59 100644
--- a/src/widget/tool/removefrienddialog.h
+++ b/src/widget/tool/removefrienddialog.h
@@ -25,7 +25,6 @@ public:
public slots:
void onAccepted();
- void onTextChanged(QString text);
protected:
Ui_RemoveFriendDialog ui;