From 673e58ca36421bb560d4e04277b6b58ce6e0db6f Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 29 Apr 2025 12:30:21 +0200 Subject: adw: implement ToolbarView --- examples/hello-world/hello.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'examples/hello-world') diff --git a/examples/hello-world/hello.cpp b/examples/hello-world/hello.cpp index dd8aa56..5351370 100644 --- a/examples/hello-world/hello.cpp +++ b/examples/hello-world/hello.cpp @@ -1,5 +1,7 @@ #include +#include + auto main(int argc, char ** argv) -> int { auto app = Adwaita::Application::create("org.example.Hello"); @@ -8,6 +10,14 @@ auto main(int argc, char ** argv) -> int auto window = new Adwaita::ApplicationWindow{app}; app->signal_shutdown().connect([window] { delete window; }); + window->set_title("Hello"); + + auto toolbar_view = Adwaita::ToolbarView{}; + auto label = Gtk::Label{"Hello World"}; + + toolbar_view.set_content(label); + + window->set_content(toolbar_view); window->present(); }); -- cgit v1.2.3