Add possibility to adjust terminal text position

The bounding rectangle used to define the position of the terminal text
can be edited. The y position and height can now be edited. The width is
not editable because is always the width of the rectangle of the of the
terminal.
This commit is contained in:
joshua
2025-03-12 21:10:16 +01:00
parent 7747223dfa
commit 2d89d70682
4 changed files with 128 additions and 69 deletions

View File

@@ -20,7 +20,6 @@
#include "terminalstriplayouteditor.h"
#include "ui_terminalstriplayouteditor.h"
#include "../GraphicsItem/properties/terminalstriplayoutpattern.h"
#include "../../utils/qetutils.h"
TerminalStripLayoutEditor::TerminalStripLayoutEditor(QSharedPointer<TerminalStripLayoutPattern> layout,
QWidget *parent) :
@@ -137,6 +136,9 @@ void TerminalStripLayoutEditor::valueEdited()
break;
}
m_layout.data()->m_terminals_text_y = ui->m_terminal_text_y_sb->value();
m_layout.data()->m_terminals_text_height = ui->m_terminal_text_height_sb->value();
updateUi();
m_preview_strip_item.update();
}
@@ -219,6 +221,9 @@ void TerminalStripLayoutEditor::updateUi()
ui->m_terminal_text_alignment_cb->setCurrentIndex(2);
}
ui->m_terminal_text_y_sb->setValue(data->m_terminals_text_y);
ui->m_terminal_text_height_sb->setValue(data->m_terminals_text_height);
m_ui_updating = false;
updatePreview();
}