Skip to content

Commit ed1e8db

Browse files
committed
Merge branch '45-increase-default-margins' into 'main'
Introducing reader view Closes #45 See merge request libreweb/browser!29
2 parents a83f92f + a59140d commit ed1e8db

File tree

4 files changed

+239
-70
lines changed

4 files changed

+239
-70
lines changed

src/draw.cc

+10-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Draw::Draw(MiddlewareInterface& middleware)
3333
{
3434
this->disableEdit();
3535
set_top_margin(12);
36-
set_left_margin(20); // fallback
37-
set_right_margin(20); // fallback
36+
set_left_margin(10); // fallback
37+
set_right_margin(10); // fallback
3838
set_bottom_margin(0);
3939
set_indent(0); // fallback
4040
set_monospace(false);
@@ -343,6 +343,14 @@ void Draw::newDocument()
343343
this->redoPool.clear();
344344
this->clear();
345345

346+
// Set margins to defaults in editor mode
347+
set_left_margin(10);
348+
set_right_margin(10);
349+
// Set indent to zero
350+
set_indent(0);
351+
// Reset word wrapping to default
352+
set_wrap_mode(Gtk::WRAP_WORD_CHAR);
353+
346354
enableEdit();
347355
grab_focus(); // Claim focus on text view
348356
}
@@ -738,7 +746,6 @@ void Draw::insert_image()
738746
buffer->end_user_action();
739747
}
740748

741-
// TODO: set_monospace(true)
742749
void Draw::make_code()
743750
{
744751
Gtk::TextBuffer::iterator start, end;

0 commit comments

Comments
 (0)