Improve terminal theming, cursor UX, and size negotiation

This commit is contained in:
Keith Smith
2026-03-01 10:14:43 -07:00
parent 20ee48db32
commit c3369b8e48
9 changed files with 141 additions and 24 deletions

View File

@@ -6,6 +6,8 @@
#include <array>
class QKeyEvent;
class QFocusEvent;
class QResizeEvent;
class TerminalView : public QTextEdit
{
@@ -20,9 +22,12 @@ public:
signals:
void inputGenerated(const QString& input);
void terminalSizeChanged(int columns, int rows);
protected:
void keyPressEvent(QKeyEvent* event) override;
void focusInEvent(QFocusEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
private:
struct ThemePalette {
@@ -51,6 +56,9 @@ private:
void handleSgrSequence(const QString& params);
void appendTextChunk(const QString& text);
QColor paletteColor(bool background, int index, bool bright) const;
int terminalColumns() const;
int terminalRows() const;
void emitTerminalSize();
};
#endif