diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-11-18 04:47:41 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-11-18 04:47:41 -0300 |
commit | 3974fbb8528c9250289e60b8ac1d3cbac762cda2 (patch) | |
tree | 1cbdd5cc9ccc4328584163b6d681a43742e88868 /scene/gui/tabs.cpp | |
parent | 17bde66cd8b26c468178405c8b9d8e078f173596 (diff) | |
download | redot-engine-3974fbb8528c9250289e60b8ac1d3cbac762cda2.tar.gz |
-fixed tabs
Diffstat (limited to 'scene/gui/tabs.cpp')
-rw-r--r-- | scene/gui/tabs.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 6d84f028b3..8e448dfb2b 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -58,7 +58,7 @@ Size2 Tabs::get_minimum_size() const { if (tabs[i].right_button.is_valid()) { Ref<Texture> rb=tabs[i].right_button; - Size2 bms = rb->get_size()+get_stylebox("button")->get_minimum_size(); + Size2 bms = rb->get_size();//+get_stylebox("button")->get_minimum_size(); bms.width+=get_constant("hseparation"); ms.width+=bms.width; @@ -67,9 +67,8 @@ Size2 Tabs::get_minimum_size() const { if (tabs[i].close_button.is_valid()) { Ref<Texture> cb=tabs[i].close_button; - Size2 bms = cb->get_size()+get_stylebox("button")->get_minimum_size(); + Size2 bms = cb->get_size();//+get_stylebox("button")->get_minimum_size(); bms.width+=get_constant("hseparation"); - ms.width+=bms.width; ms.height=MAX(bms.height+tab_bg->get_minimum_size().height,ms.height); } @@ -262,9 +261,9 @@ void Tabs::_notification(int p_what) { Ref<Texture> rb=tabs[i].right_button; lsize+=get_constant("hseparation"); - lsize+=style->get_margin(MARGIN_LEFT); + //lsize+=style->get_margin(MARGIN_LEFT); lsize+=rb->get_width(); - lsize+=style->get_margin(MARGIN_RIGHT); + //lsize+=style->get_margin(MARGIN_RIGHT); } @@ -276,9 +275,9 @@ void Tabs::_notification(int p_what) { Ref<Texture> rb=tabs[i].close_button; lsize+=get_constant("hseparation"); - lsize+=style->get_margin(MARGIN_LEFT); + //lsize+=style->get_margin(MARGIN_LEFT); lsize+=rb->get_width(); - lsize+=style->get_margin(MARGIN_RIGHT); + //lsize+=style->get_margin(MARGIN_RIGHT); } } break; @@ -289,9 +288,9 @@ void Tabs::_notification(int p_what) { Ref<Texture> rb=tabs[i].close_button; lsize+=get_constant("hseparation"); - lsize+=style->get_margin(MARGIN_LEFT); + //lsize+=style->get_margin(MARGIN_LEFT); lsize+=rb->get_width(); - lsize+=style->get_margin(MARGIN_RIGHT); + //lsize+=style->get_margin(MARGIN_RIGHT); } } @@ -303,9 +302,9 @@ void Tabs::_notification(int p_what) { Ref<Texture> rb=tabs[i].close_button; lsize+=get_constant("hseparation"); - lsize+=style->get_margin(MARGIN_LEFT); + //lsize+=style->get_margin(MARGIN_LEFT); lsize+=rb->get_width(); - lsize+=style->get_margin(MARGIN_RIGHT); + //lsize+=style->get_margin(MARGIN_RIGHT); } } @@ -404,11 +403,11 @@ void Tabs::_notification(int p_what) { style->draw(ci,cb_rect); } - w+=style->get_margin(MARGIN_LEFT); + //w+=style->get_margin(MARGIN_LEFT); cb->draw(ci,Point2i( w,cb_rect.pos.y+style->get_margin(MARGIN_TOP) )); w+=cb->get_width(); - w+=style->get_margin(MARGIN_RIGHT); + //w+=style->get_margin(MARGIN_RIGHT); tabs[i].cb_rect=cb_rect; } } break; @@ -432,11 +431,11 @@ void Tabs::_notification(int p_what) { style->draw(ci,cb_rect); } - w+=style->get_margin(MARGIN_LEFT); + //w+=style->get_margin(MARGIN_LEFT); cb->draw(ci,Point2i( w,cb_rect.pos.y+style->get_margin(MARGIN_TOP) )); w+=cb->get_width(); - w+=style->get_margin(MARGIN_RIGHT); + //w+=style->get_margin(MARGIN_RIGHT); tabs[i].cb_rect=cb_rect; } } @@ -461,11 +460,11 @@ void Tabs::_notification(int p_what) { style->draw(ci,cb_rect); } - w+=style->get_margin(MARGIN_LEFT); + //w+=style->get_margin(MARGIN_LEFT); cb->draw(ci,Point2i( w,cb_rect.pos.y+style->get_margin(MARGIN_TOP) )); w+=cb->get_width(); - w+=style->get_margin(MARGIN_RIGHT); + //w+=style->get_margin(MARGIN_RIGHT); tabs[i].cb_rect=cb_rect; } } |