Sfoglia il codice sorgente

Browser: Allow opening URLs by dropping them on the HtmlView :^)

Andreas Kling 5 anni fa
parent
commit
aef5d28828
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      Applications/Browser/Tab.cpp

+ 4 - 0
Applications/Browser/Tab.cpp

@@ -207,6 +207,10 @@ Tab::Tab()
         m_statusbar->set_text(href);
     };
 
+    m_html_widget->on_url_drop = [this](auto& url) {
+        m_html_widget->load(url);
+    };
+
     m_menubar = GUI::MenuBar::construct();
 
     auto& app_menu = m_menubar->add_menu("Browser");