summaryrefslogtreecommitdiff
path: root/DevTools/VisualBuilder/VBWidgetPropertyModel.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-06-07 11:48:27 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-06-07 11:48:27 +0200
commit892acfb10d98014e8880fa957a14541020ec263c (patch)
treeb51d77369cb45dafad64134975e933236adcd1a7 /DevTools/VisualBuilder/VBWidgetPropertyModel.cpp
parentfba2c971e79f2728b2605b8d0cc84f8303343a8c (diff)
downloadserenity-892acfb10d98014e8880fa957a14541020ec263c.zip
VisualBuilder: Run clang-format on everything.
Diffstat (limited to 'DevTools/VisualBuilder/VBWidgetPropertyModel.cpp')
-rw-r--r--DevTools/VisualBuilder/VBWidgetPropertyModel.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/DevTools/VisualBuilder/VBWidgetPropertyModel.cpp b/DevTools/VisualBuilder/VBWidgetPropertyModel.cpp
index 0a4935c660..5bee6870cb 100644
--- a/DevTools/VisualBuilder/VBWidgetPropertyModel.cpp
+++ b/DevTools/VisualBuilder/VBWidgetPropertyModel.cpp
@@ -1,6 +1,6 @@
#include "VBWidgetPropertyModel.h"
-#include "VBWidget.h"
#include "VBProperty.h"
+#include "VBWidget.h"
#include <SharedGraphics/Font.h>
VBWidgetPropertyModel::VBWidgetPropertyModel(VBWidget& widget)
@@ -20,9 +20,12 @@ int VBWidgetPropertyModel::row_count(const GModelIndex&) const
String VBWidgetPropertyModel::column_name(int column) const
{
switch (column) {
- case Column::Name: return "Name";
- case Column::Value: return "Value";
- default: ASSERT_NOT_REACHED();
+ case Column::Name:
+ return "Name";
+ case Column::Value:
+ return "Value";
+ default:
+ ASSERT_NOT_REACHED();
}
}
@@ -39,20 +42,24 @@ GVariant VBWidgetPropertyModel::data(const GModelIndex& index, Role role) const
if (role == Role::Display) {
auto& property = *m_widget.m_properties[index.row()];
switch (index.column()) {
- case Column::Name: return property.name();
- case Column::Value: return property.value();
+ case Column::Name:
+ return property.name();
+ case Column::Value:
+ return property.value();
}
ASSERT_NOT_REACHED();
}
if (role == Role::ForegroundColor) {
auto& property = *m_widget.m_properties[index.row()];
switch (index.column()) {
- case Column::Name: return Color::Black;
- case Column::Value: return property.is_readonly() ? Color(Color::MidGray) : Color(Color::Black);
+ case Column::Name:
+ return Color::Black;
+ case Column::Value:
+ return property.is_readonly() ? Color(Color::MidGray) : Color(Color::Black);
}
ASSERT_NOT_REACHED();
}
- return { };
+ return {};
}
void VBWidgetPropertyModel::set_data(const GModelIndex& index, const GVariant& value)