diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-05-14 23:09:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 23:09:03 +0200 |
commit | 00949f0c5fcc6a4f8382a4a97d5591fd9ec380f8 (patch) | |
tree | 2b1c31f45add24085b64425ce440f577424c16a1 /scene/gui/separator.cpp | |
parent | 5046f666a1181675b39f156c38346525dc1c444e (diff) | |
parent | 0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 (diff) |
Merge pull request #38738 from akien-mga/cause-we-never-go-out-of-style
Style: Remove new line at block start, enforce line between functions, enforce braces in if and loop blocks
Diffstat (limited to 'scene/gui/separator.cpp')
-rw-r--r-- | scene/gui/separator.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/scene/gui/separator.cpp b/scene/gui/separator.cpp index 75c4b7cce9..4f7e5720b8 100644 --- a/scene/gui/separator.cpp +++ b/scene/gui/separator.cpp @@ -31,7 +31,6 @@ #include "separator.h" Size2 Separator::get_minimum_size() const { - Size2 ms(3, 3); if (orientation == VERTICAL) { ms.x = get_theme_constant("separation"); @@ -42,20 +41,15 @@ Size2 Separator::get_minimum_size() const { } void Separator::_notification(int p_what) { - switch (p_what) { - case NOTIFICATION_DRAW: { - Size2i size = get_size(); Ref<StyleBox> style = get_theme_stylebox("separator"); Size2i ssize = style->get_minimum_size() + style->get_center_size(); if (orientation == VERTICAL) { - 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)); } @@ -70,11 +64,9 @@ Separator::~Separator() { } HSeparator::HSeparator() { - orientation = HORIZONTAL; } VSeparator::VSeparator() { - orientation = VERTICAL; } |