Improve terminal theming, cursor UX, and size negotiation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user