mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +00:00
added a ';' delimiter and responsive dialog box (#1983)
This commit is contained in:
parent
12c1d2c5ab
commit
7fdd8117a9
@ -8,6 +8,8 @@ EditInstructionDialog::EditInstructionDialog(InstructionEditMode editMode, QWidg
|
|||||||
editMode(editMode)
|
editMode(editMode)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->lineEdit->setMinimumWidth(400);
|
||||||
|
ui->instructionLabel->setWordWrap(true);
|
||||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||||
|
|
||||||
connect(ui->lineEdit, SIGNAL(textEdited(const QString &)), this,
|
connect(ui->lineEdit, SIGNAL(textEdited(const QString &)), this,
|
||||||
@ -46,7 +48,7 @@ void EditInstructionDialog::updatePreview(const QString &input)
|
|||||||
return;
|
return;
|
||||||
} else if (editMode == EDIT_BYTES) {
|
} else if (editMode == EDIT_BYTES) {
|
||||||
QByteArray data = CutterCore::hexStringToBytes(input);
|
QByteArray data = CutterCore::hexStringToBytes(input);
|
||||||
result = Core()->disassemble(data).simplified();
|
result = Core()->disassemble(data).replace('\n', "; ");
|
||||||
} else if (editMode == EDIT_TEXT) {
|
} else if (editMode == EDIT_TEXT) {
|
||||||
QByteArray data = Core()->assemble(input);
|
QByteArray data = Core()->assemble(input);
|
||||||
result = CutterCore::bytesToHexString(data).trimmed();
|
result = CutterCore::bytesToHexString(data).trimmed();
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetFixedSize</enum>
|
||||||
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user