1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Bring that Whole New World to the Old Continent too

Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
Rémi Verschelde
2017-03-19 00:36:26 +01:00
parent 1d418afe86
commit f8db8a3faa
1308 changed files with 147754 additions and 174357 deletions

View File

@@ -28,7 +28,6 @@
/*************************************************************************/
#include "margin_container.h"
Size2 MarginContainer::get_minimum_size() const {
int margin_left = get_constant("margin_left");
@@ -38,7 +37,7 @@ Size2 MarginContainer::get_minimum_size() const {
Size2 max;
for(int i=0;i<get_child_count();i++) {
for (int i = 0; i < get_child_count(); i++) {
Control *c = get_child(i)->cast_to<Control>();
if (!c)
@@ -59,12 +58,11 @@ Size2 MarginContainer::get_minimum_size() const {
max.height += (margin_top + margin_bottom);
return max;
}
void MarginContainer::_notification(int p_what) {
if (p_what==NOTIFICATION_SORT_CHILDREN) {
if (p_what == NOTIFICATION_SORT_CHILDREN) {
int margin_left = get_constant("margin_left");
int margin_top = get_constant("margin_top");
@@ -73,7 +71,7 @@ void MarginContainer::_notification(int p_what) {
Size2 s = get_size();
for(int i=0;i<get_child_count();i++) {
for (int i = 0; i < get_child_count(); i++) {
Control *c = get_child(i)->cast_to<Control>();
if (!c)
@@ -81,14 +79,12 @@ void MarginContainer::_notification(int p_what) {
if (c->is_set_as_toplevel())
continue;
int w=s.width-margin_left-margin_right;
int h=s.height-margin_top-margin_bottom;
fit_child_in_rect(c,Rect2(margin_left,margin_top,w,h));
int w = s.width - margin_left - margin_right;
int h = s.height - margin_top - margin_bottom;
fit_child_in_rect(c, Rect2(margin_left, margin_top, w, h));
}
}
}
MarginContainer::MarginContainer()
{
MarginContainer::MarginContainer() {
}