diff options
Diffstat (limited to 'scene/resources/default_theme/default_theme.cpp')
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 182bc5dabc..8c1233b634 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -54,8 +54,10 @@ static Ref<StyleBoxTexture> make_stylebox(T p_src,float p_left, float p_top, flo texture = Ref<ImageTexture>( memnew( ImageTexture ) ); Image img(p_src); - if (scale>1) + if (scale>1) { + img.convert(Image::FORMAT_RGBA); img.expand_x2_hq2x(); + } texture->create_from_image( img,ImageTexture::FLAG_FILTER ); (*tex_cache)[p_src]=texture; } @@ -92,8 +94,10 @@ static Ref<Texture> make_icon(T p_src) { Ref<ImageTexture> texture( memnew( ImageTexture ) ); Image img = Image(p_src); - if (scale>1) + if (scale>1) { + img.convert(Image::FORMAT_RGBA); img.expand_x2_hq2x(); + } texture->create_from_image( img,ImageTexture::FLAG_FILTER ); return texture; @@ -481,6 +485,7 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F t->set_color("breakpoint_color","TextEdit", Color(0.8,0.8,0.4,0.2) ); t->set_color("current_line_color","TextEdit", Color(0.25,0.25,0.26,0.8) ); t->set_color("caret_color","TextEdit", control_font_color ); + t->set_color("caret_background_color", "TextEdit", Color::html("000000")); t->set_color("symbol_color","TextEdit", control_font_color_hover ); t->set_color("brace_mismatch_color","TextEdit", Color(1,0.2,0.2) ); t->set_color("line_number_color","TextEdit",Color::html("66aaaaaa")); @@ -621,22 +626,30 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F // GraphNode - Ref<StyleBoxTexture> graphsb = make_stylebox(graph_node_png,6,24,6,5,3,24,16,5); - Ref<StyleBoxTexture> graphsbselected = make_stylebox(graph_node_selected_png,6,24,6,5,3,24,16,5); + Ref<StyleBoxTexture> graphsb = make_stylebox(graph_node_png,6,24,6,5,16,24,16,5); + Ref<StyleBoxTexture> graphsbcomment = make_stylebox(graph_node_comment_png,6,24,6,5,16,24,16,5); + Ref<StyleBoxTexture> graphsbselected = make_stylebox(graph_node_selected_png,6,24,6,5,16,24,16,5); Ref<StyleBoxTexture> graphsbdefault = make_stylebox(graph_node_default_png,4,4,4,4,6,4,4,4); Ref<StyleBoxTexture> graphsbdeffocus = make_stylebox(graph_node_default_focus_png,4,4,4,4,6,4,4,4); + Ref<StyleBoxTexture> graph_bpoint = make_stylebox(graph_node_breakpoint_png,6,24,6,5,16,24,16,5); + Ref<StyleBoxTexture> graph_position = make_stylebox(graph_node_position_png,6,24,6,5,16,24,16,5); + //graphsb->set_expand_margin_size(MARGIN_LEFT,10); //graphsb->set_expand_margin_size(MARGIN_RIGHT,10); t->set_stylebox("frame","GraphNode", graphsb ); t->set_stylebox("selectedframe","GraphNode", graphsbselected ); t->set_stylebox("defaultframe", "GraphNode", graphsbdefault ); t->set_stylebox("defaultfocus", "GraphNode", graphsbdeffocus ); + t->set_stylebox("comment", "GraphNode", graphsbcomment ); + t->set_stylebox("breakpoint", "GraphNode", graph_bpoint ); + t->set_stylebox("position", "GraphNode", graph_position ); t->set_constant("separation","GraphNode", 1 *scale); t->set_icon("port","GraphNode", make_icon( graph_port_png ) ); t->set_icon("close","GraphNode", make_icon( graph_node_close_png ) ); + t->set_icon("resizer","GraphNode", make_icon( window_resizer_png ) ); t->set_font("title_font","GraphNode", default_font ); t->set_color("title_color","GraphNode", Color(0,0,0,1)); - t->set_constant("title_offset","GraphNode", 18 *scale); + t->set_constant("title_offset","GraphNode", 20 *scale); t->set_constant("close_offset","GraphNode", 18 *scale); t->set_constant("port_offset","GraphNode", 3 *scale); @@ -916,7 +929,12 @@ void fill_default_theme(Ref<Theme>& t,const Ref<Font> & default_font,const Ref<F t->set_icon("minus","GraphEdit", make_icon(icon_zoom_less_png) ); t->set_icon("reset","GraphEdit", make_icon(icon_zoom_reset_png) ); t->set_icon("more","GraphEdit", make_icon(icon_zoom_more_png) ); + t->set_icon("snap","GraphEdit", make_icon(icon_snap_png) ); t->set_stylebox("bg","GraphEdit", make_stylebox( tree_bg_png,4,4,4,5) ); + t->set_color("grid_minor","GraphEdit", Color(1,1,1,0.05) ); + t->set_color("grid_major","GraphEdit", Color(1,1,1,0.2) ); + t->set_constant("bezier_len_pos","GraphEdit", 80*scale ); + t->set_constant("bezier_len_neg","GraphEdit", 160*scale ); |