diff options
| author | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2024-03-03 20:26:39 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-03 20:26:39 -0600 |
| commit | b48ca2455a2c7674859b2d3d8be2896cdc0f3739 (patch) | |
| tree | 766e221eff743aba3f95071a100e255b28958f69 /include/aotextboxwidgets.h | |
| parent | a8b28f50707a9cb7f0377e247e332519563237a2 (diff) | |
Add the ability for shownames to be outlined (#939)
* showname text outline, partial messagebox outline code
* your honor i plead oopsie daisies
* Focus down code, add config hookups
* remove extraneous qDebug calls
Diffstat (limited to 'include/aotextboxwidgets.h')
| -rw-r--r-- | include/aotextboxwidgets.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/aotextboxwidgets.h b/include/aotextboxwidgets.h new file mode 100644 index 00000000..39bf4062 --- /dev/null +++ b/include/aotextboxwidgets.h @@ -0,0 +1,32 @@ +#ifndef AOTEXTBOXWIDGETS_H +#define AOTEXTBOXWIDGETS_H + +#include <QAbstractTextDocumentLayout> +#include <QDebug> +#include <QLabel> +#include <QPaintEvent> +#include <QPainter> +#include <QPainterPath> +#include <QTextEdit> + +class AOChatboxLabel : public QLabel { + Q_OBJECT + +public: + AOChatboxLabel(QWidget *parent); + void paintEvent(QPaintEvent *event); + + void setOutlineColor(QColor color) { outline_color = color; }; + void setOutlineWidth(int width) { outline_width = width; }; + void setTextColor(QColor color) { text_color = color; }; + void setIsOutlined(bool outlined) { is_outlined = outlined; }; + +protected: +private: + QColor outline_color; + QColor text_color; + int outline_width = 1; + bool is_outlined = false; +}; + +#endif // AOTEXTBOXWIDGETS_H |
