diff --git a/cpp_browser/browser.cpp b/cpp_browser/browser.cpp index c7f58ca..aa029a6 100644 --- a/cpp_browser/browser.cpp +++ b/cpp_browser/browser.cpp @@ -30,10 +30,14 @@ MyWindow::MyWindow() { auto iter = refTextBuffer->get_iter_at_offset(0); for (LayoutElement element : elements) { - iter = refTextBuffer->insert_with_tag(iter, element.text, element.toTextTag(refTextBuffer)); + iter = refTextBuffer->insert_with_tag(iter, element.text, + element.toTextTag(refTextBuffer)); } m_TextView.set_buffer(refTextBuffer); + m_TextView.set_editable(false); + m_TextView.set_cursor_visible(false); + m_TextView.set_wrap_mode(Gtk::WrapMode::WORD); m_ScrolledWindow.set_child(m_TextView); } diff --git a/cpp_browser/layout.cpp b/cpp_browser/layout.cpp index f1461f3..3d6b7da 100644 --- a/cpp_browser/layout.cpp +++ b/cpp_browser/layout.cpp @@ -1,5 +1,3 @@ - - #include "layout.h" #include @@ -55,7 +53,7 @@ vector layout(vector tokens) { continue; } else if (token.text == "/p") { // HACK: add new line and indent after

- out.push_back(LayoutElement(weight, style, size, "\n\t")); + out.push_back(LayoutElement(weight, style, size, "\n\n")); } }