summaryrefslogtreecommitdiff
path: root/Applications/Browser
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-05 10:30:38 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-05 10:30:49 +0200
commit4173c77eb50fcfba3d6fcc8a9f6fed59a4f0d4ee (patch)
tree1d3acd86365995451e33390f59a4f096171ecf98 /Applications/Browser
parenta8297657ab845533f6655947c4f6a2aab6810c32 (diff)
downloadserenity-4173c77eb50fcfba3d6fcc8a9f6fed59a4f0d4ee.zip
Browser: Show the page title in the window title bar :^)
Diffstat (limited to 'Applications/Browser')
-rw-r--r--Applications/Browser/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp
index 0364619dcb..23e53f794f 100644
--- a/Applications/Browser/main.cpp
+++ b/Applications/Browser/main.cpp
@@ -61,6 +61,10 @@ int main(int argc, char** argv)
html_widget->load(html_widget->document()->complete_url(url));
};
+ html_widget->on_title_change = [&](auto& title) {
+ window->set_title(String::format("%s - Browser", title.characters()));
+ };
+
auto focus_location_box_action = GAction::create("Focus location box", { Mod_Ctrl, Key_L }, [&](auto&) {
location_box->select_all();
location_box->set_focus(true);