From 3f56d76a2b0d528c05ab8d0a38059ca82ba90952 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 26 Jul 2025 00:39:23 +0530 Subject: Add set_html for views + example use with decorations --- src/widgets/Decorations.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/widgets/Decorations.hpp') 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; -- cgit v1.3.1