diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-07-26 00:39:23 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-07-26 00:39:23 +0530 |
| commit | 3f56d76a2b0d528c05ab8d0a38059ca82ba90952 (patch) | |
| tree | daae7849815c122803f8ddd08cbfcb87552eab8a /src/widgets/Decorations.hpp | |
| parent | 031b22e0bb0f1d132731aea3776917731a8ab4ce (diff) | |
| download | null-browser-3f56d76a2b0d528c05ab8d0a38059ca82ba90952.tar.gz null-browser-3f56d76a2b0d528c05ab8d0a38059ca82ba90952.zip | |
Add set_html for views + example use with decorations
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/Decorations.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widgets/Decorations.hpp b/src/widgets/Decorations.hpp index 57fc526..8eac419 100644 --- a/src/widgets/Decorations.hpp +++ b/src/widgets/Decorations.hpp @@ -44,6 +44,15 @@ public: } } + void set_html(const QString &html, WebViewId view_id) { + for (auto *decoration : decorations()) { + if (decoration->get_view_id() == view_id) { + decoration->set_html(html); + return; + } + } + } + private: EdgeDecoration *decoration_top; EdgeDecoration *decoration_bottom; |
