diff options
author | Ray Koopa <raykoopa@users.noreply.github.com> | 2017-01-24 18:21:54 +0100 |
---|---|---|
committer | Ray Koopa <raykoopa@users.noreply.github.com> | 2017-03-01 23:40:10 +0100 |
commit | e07aa5deb849fb4b28422e69f785c1537e1b7646 (patch) | |
tree | 3f07929e7b58cd5b30538540e7b2485a93f28bd1 /scene/resources/default_theme/default_theme.cpp | |
parent | 68fe36ed26c82d58dd8dffb3c64fd8d3de9569ca (diff) |
Added functionality for resizable dialogs.
Diffstat (limited to 'scene/resources/default_theme/default_theme.cpp')
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 878aafe881..dbe0f3e33e 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -583,24 +583,19 @@ void fill_default_theme(Ref<Theme>& t, const Ref<Font> & default_font, const Ref // WindowDialog - Ref<StyleBoxTexture> style_pp_win = sb_expand(make_stylebox( popup_window_png,10,30,10,8),8,26,8,4); - /*for(int i=0;i<4;i++) - style_pp_win->set_expand_margin_size((Margin)i,3); - style_pp_win->set_expand_margin_size(MARGIN_TOP,26);*/ - - t->set_stylebox("panel","WindowDialog", style_pp_win ); - - t->set_icon("close","WindowDialog", make_icon( close_png ) ); - t->set_icon("close_hilite","WindowDialog", make_icon( close_hl_png ) ); - - t->set_font("title_font","WindowDialog", large_font ); - - t->set_color("title_color","WindowDialog", Color(0,0,0) ); - - t->set_constant("close_h_ofs","WindowDialog", 22 *scale); - t->set_constant("close_v_ofs","WindowDialog", 20 *scale); - t->set_constant("titlebar_height","WindowDialog", 18 *scale); - t->set_constant("title_height","WindowDialog", 20 *scale); + Ref<StyleBoxTexture> style_pp_win = sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6); + t->set_stylebox("panel", "WindowDialog", style_pp_win); + t->set_constant("titlebar_height", "WindowDialog", 20 * scale); + t->set_constant("scaleborder_size", "WindowDialog", 4); + + t->set_font("title_font", "WindowDialog", large_font); + t->set_color("title_color", "WindowDialog", Color(0, 0, 0)); + t->set_constant("title_height", "WindowDialog", 18 * scale); + + t->set_icon("close", "WindowDialog", make_icon(close_png)); + t->set_icon("close_hilite", "WindowDialog", make_icon(close_hl_png)); + t->set_constant("close_h_ofs", "WindowDialog", 18 * scale); + t->set_constant("close_v_ofs", "WindowDialog", 18 * scale); // File Dialog |