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,54 +28,47 @@
/*************************************************************************/
#include "separator.h"
Size2 Separator::get_minimum_size() const {
Size2 ms(3,3);
ms[orientation]=get_constant("separation");
Size2 ms(3, 3);
ms[orientation] = get_constant("separation");
return ms;
}
void Separator::_notification(int p_what) {
switch(p_what) {
switch (p_what) {
case NOTIFICATION_DRAW: {
Size2i size = get_size();
Ref<StyleBox> style = get_stylebox("separator");
Size2i ssize=style->get_minimum_size()+style->get_center_size();
Size2i ssize = style->get_minimum_size() + style->get_center_size();
if (orientation==VERTICAL) {
if (orientation == VERTICAL) {
style->draw(get_canvas_item(),Rect2( (size.x-ssize.x)/2,0,ssize.x,size.y ));
style->draw(get_canvas_item(), Rect2((size.x - ssize.x) / 2, 0, ssize.x, size.y));
} else {
style->draw(get_canvas_item(),Rect2( 0,(size.y-ssize.y)/2,size.x,ssize.y ));
style->draw(get_canvas_item(), Rect2(0, (size.y - ssize.y) / 2, size.x, ssize.y));
}
} break;
}
}
Separator::Separator()
{
Separator::Separator() {
}
Separator::~Separator()
{
Separator::~Separator() {
}
HSeparator::HSeparator() {
orientation=HORIZONTAL;
orientation = HORIZONTAL;
}
VSeparator::VSeparator() {
orientation=VERTICAL;
orientation = VERTICAL;
}