mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
GTextEditor: Turn off the ruler by default.
You're usually not gonna want the ruler. TextEditor can enable it manually.
This commit is contained in:
parent
5c240af3f7
commit
4bea3a4aa6
Notes:
sideshowbarker
2024-07-19 14:36:12 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4bea3a4aa69
@ -24,6 +24,7 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
auto* toolbar = new GToolBar(widget);
|
auto* toolbar = new GToolBar(widget);
|
||||||
auto* text_editor = new GTextEditor(GTextEditor::MultiLine, widget);
|
auto* text_editor = new GTextEditor(GTextEditor::MultiLine, widget);
|
||||||
|
text_editor->set_ruler_visible(true);
|
||||||
auto* statusbar = new GStatusBar(widget);
|
auto* statusbar = new GStatusBar(widget);
|
||||||
|
|
||||||
text_editor->on_cursor_change = [statusbar, text_editor] {
|
text_editor->on_cursor_change = [statusbar, text_editor] {
|
||||||
|
@ -20,7 +20,6 @@ GTextEditor::GTextEditor(Type type, GWidget* parent)
|
|||||||
set_frame_shadow(FrameShadow::Sunken);
|
set_frame_shadow(FrameShadow::Sunken);
|
||||||
set_frame_thickness(2);
|
set_frame_thickness(2);
|
||||||
set_scrollbars_enabled(is_multi_line());
|
set_scrollbars_enabled(is_multi_line());
|
||||||
m_ruler_visible = is_multi_line();
|
|
||||||
set_font(GFontDatabase::the().get_by_name("Csilla Thin"));
|
set_font(GFontDatabase::the().get_by_name("Csilla Thin"));
|
||||||
m_lines.append(make<Line>());
|
m_lines.append(make<Line>());
|
||||||
m_cursor = { 0, 0 };
|
m_cursor = { 0, 0 };
|
||||||
|
@ -187,7 +187,7 @@ private:
|
|||||||
TextAlignment m_text_alignment { TextAlignment::CenterLeft };
|
TextAlignment m_text_alignment { TextAlignment::CenterLeft };
|
||||||
bool m_cursor_state { true };
|
bool m_cursor_state { true };
|
||||||
bool m_in_drag_select { false };
|
bool m_in_drag_select { false };
|
||||||
bool m_ruler_visible { true };
|
bool m_ruler_visible { false };
|
||||||
bool m_have_pending_change_notification { false };
|
bool m_have_pending_change_notification { false };
|
||||||
int m_line_spacing { 4 };
|
int m_line_spacing { 4 };
|
||||||
int m_soft_tab_width { 4 };
|
int m_soft_tab_width { 4 };
|
||||||
|
Loading…
Reference in New Issue
Block a user