Ladybird/BrowserWindow: Make "View Source" a separate window

View Source was a subwindow which made it cover part of the browser with
no way for closing it.
This commit is contained in:
Moustafa Raafat 2022-10-03 19:31:42 +01:00 committed by Andrew Kaster
parent c2230d5fe8
commit 742c4767df
Notes: sideshowbarker 2024-07-17 06:24:08 +09:00

View file

@ -97,6 +97,7 @@ BrowserWindow::BrowserWindow()
auto source = m_current_tab->view().source();
auto* text_edit = new QPlainTextEdit(this);
text_edit->setWindowFlags(Qt::Window);
text_edit->setFont(QFontDatabase::systemFont(QFontDatabase::SystemFont::FixedFont));
text_edit->resize(800, 600);
text_edit->setPlainText(source.characters());