summaryrefslogtreecommitdiff
path: root/Applications/DisplaySettings
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-21 19:36:09 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-21 19:55:44 +0200
commit2e03bded43344d4dd2d4f19d4d963646aaa77e40 (patch)
tree28f044c3485c240307abb8c289cbdb28831dfb80 /Applications/DisplaySettings
parent3c819b8ff4d8c1cefceeb65ee0e89e3858a11bb5 (diff)
downloadserenity-2e03bded43344d4dd2d4f19d4d963646aaa77e40.zip
LibGUI: Add Model::Role::TextAlignment and remove from ColumnMetadata
Diffstat (limited to 'Applications/DisplaySettings')
-rw-r--r--Applications/DisplaySettings/ItemListModel.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Applications/DisplaySettings/ItemListModel.h b/Applications/DisplaySettings/ItemListModel.h
index 9c4d840a99..fdc2f8d911 100644
--- a/Applications/DisplaySettings/ItemListModel.h
+++ b/Applications/DisplaySettings/ItemListModel.h
@@ -35,7 +35,7 @@ class ItemListModel final : public GUI::Model {
public:
static NonnullRefPtr<ItemListModel> create(Vector<T>& data) { return adopt(*new ItemListModel<T>(data)); }
- virtual ~ItemListModel() override {}
+ virtual ~ItemListModel() override { }
virtual int row_count(const GUI::ModelIndex&) const override
{
@@ -54,11 +54,13 @@ public:
virtual ColumnMetadata column_metadata(int) const override
{
- return { 70, Gfx::TextAlignment::CenterLeft };
+ return { 70 };
}
virtual GUI::Variant data(const GUI::ModelIndex& index, Role role = Role::Display) const override
{
+ if (role == Role::TextAlignment)
+ return Gfx::TextAlignment::CenterLeft;
if (role == Role::Display)
return m_data.at(index.row());