-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdauseterminal.h
More file actions
41 lines (33 loc) · 902 Bytes
/
dauseterminal.h
File metadata and controls
41 lines (33 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef DAUSETERMINAL_H
#define DAUSETERMINAL_H
#include <QWidget>
#include <QPainter>
#include <QVBoxLayout>
#include <QPaintEvent>
#include <QStyleOption>
#include <qtermwidget.h>
class DauseTerminal : public QWidget {
Q_OBJECT
public:
explicit DauseTerminal(QWidget *parent = nullptr);
QTermWidget* term() const { return m_terminal; }
protected:
void paintEvent(QPaintEvent *event) override;
private:
QTermWidget *m_terminal;
// ---- Terminal ----
const int MIN_TERM_WIDTH = 142;
const int MIN_TERM_HEIGHT = 80;
// ---- Styles ----
static constexpr const char *TERMINAL_STYLE = R"(
DauseTerminal {
border-radius: 6px;
border: 2px solid #1f2e40;
background-color: #05080e;
}
DauseTerminal[focused="true"] {
border: 2px solid #99a0b2;
}
)";
};
#endif // DAUSETERMINAL_H