diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-07-25 23:17:02 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-07-25 23:17:02 +0530 |
| commit | 031b22e0bb0f1d132731aea3776917731a8ab4ce (patch) | |
| tree | 1c3775d5aba426669a0ea0b8821a7b4b0808aab0 /src/widgets/EdgeDecoration.hpp | |
| parent | 81dcf7de91c1866d565f7aa9eb38f7fbd1cd7ad7 (diff) | |
| download | null-browser-031b22e0bb0f1d132731aea3776917731a8ab4ce.tar.gz null-browser-031b22e0bb0f1d132731aea3776917731a8ab4ce.zip | |
Add decorations.*.view lua api + support decoration views for open url
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/EdgeDecoration.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/EdgeDecoration.hpp b/src/widgets/EdgeDecoration.hpp index 3ee0ab5..f627636 100644 --- a/src/widgets/EdgeDecoration.hpp +++ b/src/widgets/EdgeDecoration.hpp @@ -9,6 +9,7 @@ #include "utils.hpp" #include "widgets/WebView.hpp" +#include "widgets/WebViewStack.hpp" class EdgeDecoration : public QWidget { Q_OBJECT @@ -19,9 +20,18 @@ public: void set_size(uint16_t size_value); void set_html(const QString &content); void set_enabled(bool enabled_value); + void set_url(const QUrl &url) { + if (!webview.has_value()) + return; + webview.value()->setUrl(url); + } DEFINE_GETTER(is_enabled, enabled) + std::optional<WebViewId> get_view_id() { + return webview.has_value() ? std::make_optional(webview.value()->get_id()) : std::nullopt; + } + private: bool vertical; std::optional<WebView *> webview = std::nullopt; |
