From 4758057f205a7d2e0d2db2c034705b7afcdf310f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 6 Mar 2020 14:00:16 -0300 Subject: Working multiple window support, including editor --- scene/resources/default_theme/default_theme.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'scene/resources/default_theme/default_theme.cpp') diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 9f5b49c4c3..2449f1adf0 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -188,6 +188,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const // Panel theme->set_stylebox("panel", "Panel", make_stylebox(panel_bg_png, 0, 0, 0, 0)); + theme->set_stylebox("panel_fg", "Panel", make_stylebox(panel_bg_png, 0, 0, 0, 0)); // Focus @@ -523,17 +524,18 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const // WindowDialog - theme->set_stylebox("panel", "WindowDialog", sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6)); - theme->set_constant("scaleborder_size", "WindowDialog", 4 * scale); + theme->set_stylebox("panel", "AcceptDialog", default_style); + theme->set_stylebox("window_panel", "AcceptDialog", sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6)); + theme->set_constant("scaleborder_size", "AcceptDialog", 4 * scale); - theme->set_font("title_font", "WindowDialog", large_font); - theme->set_color("title_color", "WindowDialog", Color(0, 0, 0)); - theme->set_constant("title_height", "WindowDialog", 20 * scale); + theme->set_font("title_font", "AcceptDialog", large_font); + theme->set_color("title_color", "AcceptDialog", Color(0, 0, 0)); + theme->set_constant("title_height", "AcceptDialog", 20 * scale); - theme->set_icon("close", "WindowDialog", make_icon(close_png)); - theme->set_icon("close_highlight", "WindowDialog", make_icon(close_hl_png)); - theme->set_constant("close_h_ofs", "WindowDialog", 18 * scale); - theme->set_constant("close_v_ofs", "WindowDialog", 18 * scale); + theme->set_icon("close", "AcceptDialog", make_icon(close_png)); + theme->set_icon("close_highlight", "AcceptDialog", make_icon(close_hl_png)); + theme->set_constant("close_h_ofs", "AcceptDialog", 18 * scale); + theme->set_constant("close_v_ofs", "AcceptDialog", 18 * scale); // File Dialog -- cgit v1.2.3 From c7b4dcae2f3b75ad7146e36f196893731f403144 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 14 Mar 2020 13:06:39 -0300 Subject: Open sub-windows as embedded if the OS does not support them --- scene/resources/default_theme/default_theme.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'scene/resources/default_theme/default_theme.cpp') diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 2449f1adf0..0c45779307 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -524,18 +524,19 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const // WindowDialog - theme->set_stylebox("panel", "AcceptDialog", default_style); - theme->set_stylebox("window_panel", "AcceptDialog", sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6)); - theme->set_constant("scaleborder_size", "AcceptDialog", 4 * scale); - - theme->set_font("title_font", "AcceptDialog", large_font); - theme->set_color("title_color", "AcceptDialog", Color(0, 0, 0)); - theme->set_constant("title_height", "AcceptDialog", 20 * scale); - - theme->set_icon("close", "AcceptDialog", make_icon(close_png)); - theme->set_icon("close_highlight", "AcceptDialog", make_icon(close_hl_png)); - theme->set_constant("close_h_ofs", "AcceptDialog", 18 * scale); - theme->set_constant("close_v_ofs", "AcceptDialog", 18 * scale); + theme->set_stylebox("panel", "Window", default_style); + theme->set_stylebox("window_panel", "Window", sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6)); + theme->set_constant("scaleborder_size", "Window", 4 * scale); + + theme->set_font("title_font", "Window", large_font); + theme->set_color("title_color", "Window", Color(0, 0, 0)); + theme->set_constant("title_height", "Window", 20 * scale); + theme->set_constant("resize_margin", "Window", 4 * scale); + + theme->set_icon("close", "Window", make_icon(close_png)); + theme->set_icon("close_highlight", "Window", make_icon(close_hl_png)); + theme->set_constant("close_h_ofs", "Window", 18 * scale); + theme->set_constant("close_v_ofs", "Window", 18 * scale); // File Dialog -- cgit v1.2.3