diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-07-25 18:56:49 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-07-25 18:56:49 +0530 |
| commit | 2c7d36b4aa53ffa638a7aa7046767f10e7a152bf (patch) | |
| tree | 679c34d6566f5a774bcd5f979af755cf3cfeac4f /src/widgets/Decorations.hpp | |
| parent | 51be15cd7c9f39276f27d416356744041e62c22c (diff) | |
| download | null-browser-2c7d36b4aa53ffa638a7aa7046767f10e7a152bf.tar.gz null-browser-2c7d36b4aa53ffa638a7aa7046767f10e7a152bf.zip | |
Expose decorations enable/disable lua api
Diffstat (limited to 'src/widgets/Decorations.hpp')
| -rw-r--r-- | src/widgets/Decorations.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/widgets/Decorations.hpp b/src/widgets/Decorations.hpp index e35e83c..d58ee7f 100644 --- a/src/widgets/Decorations.hpp +++ b/src/widgets/Decorations.hpp @@ -3,17 +3,29 @@ #include "widgets/EdgeDecoration.hpp" #include <QWidget> #include <QtCore> +#include <optional> #include <qwebengineprofile.h> +enum DecorationType : uint8_t { + DecorationTop = 1, + DecorationBottom = 2, + DecorationLeft = 3, + DecorationRight = 4, +}; + class Decorations : public QWidget { Q_OBJECT public: Decorations(QWidget *content_widget, QWebEngineProfile *profile, QWidget *parent = nullptr); + void set_enabled(DecorationType type, bool enabled); + private: EdgeDecoration *decoration_top; EdgeDecoration *decoration_bottom; EdgeDecoration *decoration_left; EdgeDecoration *decoration_right; + + std::optional<EdgeDecoration *> get_decoration_widget(DecorationType type); }; |
