summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/ListView.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-21 19:54:43 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-21 19:55:44 +0200
commit278b30771305bb49a7149ad1467f34cebabceee9 (patch)
treef74250a6110ccee64de92fefbe37d4992869a4aa /Libraries/LibGUI/ListView.cpp
parent2adb0a07e53695e1f636384a3323aba828d48e52 (diff)
downloadserenity-278b30771305bb49a7149ad1467f34cebabceee9.zip
LibGUI: Make all views use CenterLeft as the default text alignment
If a model doesn't specify a text alignment for a given field, we now fall back to CenterLeft. This will look better than Center in the vast majority of cases.
Diffstat (limited to 'Libraries/LibGUI/ListView.cpp')
-rw-r--r--Libraries/LibGUI/ListView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/ListView.cpp b/Libraries/LibGUI/ListView.cpp
index b16b012134..10b2732c30 100644
--- a/Libraries/LibGUI/ListView.cpp
+++ b/Libraries/LibGUI/ListView.cpp
@@ -162,7 +162,7 @@ void ListView::paint_event(PaintEvent& event)
auto text_rect = row_rect;
text_rect.move_by(horizontal_padding(), 0);
text_rect.set_width(text_rect.width() - horizontal_padding() * 2);
- auto text_alignment = model()->data(index, Model::Role::TextAlignment).to_text_alignment(Gfx::TextAlignment::Center);
+ auto text_alignment = model()->data(index, Model::Role::TextAlignment).to_text_alignment(Gfx::TextAlignment::CenterLeft);
painter.draw_text(text_rect, data.to_string(), font, text_alignment, text_color);
}