added a ';' delimiter and responsive dialog box (#1983)

This commit is contained in:
int_13h 2020-01-02 13:33:04 +05:30 committed by Itay Cohen
parent 12c1d2c5ab
commit 7fdd8117a9
2 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,8 @@ EditInstructionDialog::EditInstructionDialog(InstructionEditMode editMode, QWidg
editMode(editMode)
{
ui->setupUi(this);
ui->lineEdit->setMinimumWidth(400);
ui->instructionLabel->setWordWrap(true);
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
connect(ui->lineEdit, SIGNAL(textEdited(const QString &)), this,
@ -46,7 +48,7 @@ void EditInstructionDialog::updatePreview(const QString &input)
return;
} else if (editMode == EDIT_BYTES) {
QByteArray data = CutterCore::hexStringToBytes(input);
result = Core()->disassemble(data).simplified();
result = Core()->disassemble(data).replace('\n', "; ");
} else if (editMode == EDIT_TEXT) {
QByteArray data = Core()->assemble(input);
result = CutterCore::bytesToHexString(data).trimmed();

View File

@ -20,6 +20,9 @@
<property name="spacing">
<number>2</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<property name="leftMargin">
<number>2</number>
</property>