From 8b1dcbfe4d92f9d7273bbd2f1eb805e5c508961a Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 12 Mar 2016 10:44:12 -0300 Subject: -Made editor support SSL certs by default (embedded them) -Made asset sharing support https -Many fixes to HTTPRequest -Added an asset installer dialog -Visual cleanups to asset sharing tab -Fixed some issues in ScrollContainer, hope it does not break things -Asset sharing tab is not visible (hidden on purpose) for now. --- scene/gui/panel_container.cpp | 7 ++++++- scene/gui/scroll_container.cpp | 38 +++++++++++++++++++++++++++++++++++++- scene/gui/tree.cpp | 7 +++++++ scene/gui/tree.h | 1 + 4 files changed, 51 insertions(+), 2 deletions(-) (limited to 'scene/gui') diff --git a/scene/gui/panel_container.cpp b/scene/gui/panel_container.cpp index bcf75b79f8..b5e3ef8c7b 100644 --- a/scene/gui/panel_container.cpp +++ b/scene/gui/panel_container.cpp @@ -31,7 +31,12 @@ Size2 PanelContainer::get_minimum_size() const { - Ref style=get_stylebox("panel"); + Ref style; + + if (has_stylebox("panel")) + style=get_stylebox("panel"); + else + style=get_stylebox("panel","PanelContainer"); Size2 ms; diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index a2fc038f9e..9bf93aff77 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -35,7 +35,37 @@ bool ScrollContainer::clips_input() const { Size2 ScrollContainer::get_minimum_size() const { - return Size2(1, 1); + + Size2 min_size; + + for(int i=0;icast_to(); + if (!c) + continue; + if (c->is_set_as_toplevel()) + continue; + if (c == h_scroll || c == v_scroll) + continue; + Size2 minsize = c->get_combined_minimum_size(); + + + if (!scroll_h) { + min_size.x = MAX(min_size.x, minsize.x); + } + if (!scroll_v) { + min_size.y = MAX(min_size.y, minsize.y); + + } + } + + if (h_scroll->is_visible()) { + min_size.y+=h_scroll->get_minimum_size().y; + } + if (v_scroll->is_visible()) { + min_size.x+=v_scroll->get_minimum_size().x; + } + return min_size; }; @@ -179,6 +209,12 @@ void ScrollContainer::_notification(int p_what) { child_max_size = Size2(0, 0); Size2 size = get_size(); + if (h_scroll->is_visible()) + size.y-=h_scroll->get_minimum_size().y; + + if (v_scroll->is_visible()) + size.x-=h_scroll->get_minimum_size().x; + for(int i=0;icast_to(); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index f793bbe3c6..483aa47f35 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -574,7 +574,14 @@ void TreeItem::set_custom_color(int p_column,const Color& p_color) { cells[p_column].color=p_color; _changed_notify(p_column); } +Color TreeItem::get_custom_color(int p_column) const { + ERR_FAIL_INDEX_V( p_column, cells.size(), Color() ); + if (!cells[p_column].custom_color) + return Color(); + return cells[p_column].color; + +} void TreeItem::clear_custom_color(int p_column) { ERR_FAIL_INDEX( p_column, cells.size() ); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 421cfc47bc..1ba1c6a494 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -221,6 +221,7 @@ public: bool is_editable(int p_column); void set_custom_color(int p_column,const Color& p_color); + Color get_custom_color(int p_column) const; void clear_custom_color(int p_column); void set_custom_bg_color(int p_column,const Color& p_color); -- cgit v1.2.3