Skip to content

Commit

Permalink
THEME CHANGES ignore the images and check the text files especially t…
Browse files Browse the repository at this point in the history
…he editor_node
  • Loading branch information
toger5 committed Mar 29, 2017
1 parent 15d1fca commit 5e97449
Show file tree
Hide file tree
Showing 190 changed files with 144 additions and 120 deletions.
16 changes: 8 additions & 8 deletions demos/2d/platformer/stage.xml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions demos/2d/screen_space_shaders/engine.cfg
Expand Up @@ -10,3 +10,7 @@ width=800
height=600
stretch_mode="2d"
stretch_aspect="keep"

[render]

default_clear_color=#ff5b6472
2 changes: 1 addition & 1 deletion demos/2d/screen_space_shaders/screen_shaders.gd
Expand Up @@ -22,4 +22,4 @@ func _on_effect_item_selected(ID):
if (ID == c):
get_node("effects").get_child(c).show()
else:
get_node("effects").get_child(c).hide()
get_node("effects").get_child(c).hide()
Binary file modified demos/2d/screen_space_shaders/screen_shaders.scn
Binary file not shown.
14 changes: 10 additions & 4 deletions scene/gui/tabs.cpp
Expand Up @@ -253,7 +253,9 @@ void Tabs::_notification(int p_what) {

Ref<StyleBox> tab_bg = get_stylebox("tab_bg");
Ref<StyleBox> tab_fg = get_stylebox("tab_fg");
Ref<Font> font = get_font("font");
Ref<Font> normal_font = get_font("font");
//toger
Ref<Font> bold_font = get_font("bold_font");
Color color_fg = get_color("font_color_fg");
Color color_bg = get_color("font_color_bg");
Ref<Texture> close=get_icon("close");
Expand Down Expand Up @@ -315,7 +317,7 @@ void Tabs::_notification(int p_what) {

String s = tabs[i].text;
int lsize=0;
int slen=font->get_string_size(s).width;
int slen= normal_font->get_string_size(s).width;
lsize+=slen;


Expand Down Expand Up @@ -360,7 +362,7 @@ void Tabs::_notification(int p_what) {
}



Ref<Font> fo;
Ref<StyleBox> sb;
int va;
Color col;
Expand All @@ -370,10 +372,12 @@ void Tabs::_notification(int p_what) {
sb=tab_fg;
va=label_valign_fg;
col=color_fg;
fo = bold_font;//toger
} else {
sb=tab_bg;
va=label_valign_bg;
col=color_bg;
fo = normal_font;//toger
}


Expand All @@ -391,7 +395,9 @@ void Tabs::_notification(int p_what) {

}

font->draw(ci, Point2i( w, sb->get_margin(MARGIN_TOP)+((sb_rect.size.y-sb_ms.y)-font->get_height())/2+font->get_ascent() ), s, col );
//toger
fo->draw(ci, Point2i( w, sb->get_margin(MARGIN_TOP)+((sb_rect.size.y-sb_ms.y)- fo->get_height())/2+ fo->get_ascent() ), s, col );
//font->draw(ci, Point2i( w, sb->get_margin(MARGIN_TOP)+((sb_rect.size.y-sb_ms.y)-font->get_height())/2+font->get_ascent() ), s, col );

w+=slen;

Expand Down
Binary file modified scene/resources/default_theme/arrow_down.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/arrow_right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/button_disabled.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/button_focus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/button_hover.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/button_normal.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/button_pressed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/checked.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/close_hl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 18 additions & 20 deletions scene/resources/default_theme/default_theme.cpp
Expand Up @@ -188,7 +188,7 @@ void make_default_theme() {
Ref<Theme> t( memnew( Theme ) );

//Ref<Font> default_font = make_font(_bi_font_normal_height,_bi_font_normal_ascent,_bi_font_normal_valign,_bi_font_normal_charcount,_bi_font_normal_characters,make_icon(font_normal_png));
Ref<Font> default_font=make_font2(_builtin_normal_font_height,_builtin_normal_font_ascent,_builtin_normal_font_charcount,&_builtin_normal_font_charrects[0][0],_builtin_normal_font_kerning_pair_count,&_builtin_normal_font_kerning_pairs[0][0],_builtin_normal_font_img_width,_builtin_normal_font_img_height,_builtin_normal_font_img_data);
Ref<Font> default_font = make_font2(_builtin_normal_font_height, _builtin_normal_font_ascent, _builtin_normal_font_charcount, &_builtin_normal_font_charrects[0][0], _builtin_normal_font_kerning_pair_count, &_builtin_normal_font_kerning_pairs[0][0], _builtin_normal_font_img_width, _builtin_normal_font_img_height, _builtin_normal_font_img_data);
Ref<Font> source_font=make_font2(_builtin_source_font_height,_builtin_source_font_ascent,_builtin_source_font_charcount,&_builtin_source_font_charrects[0][0],_builtin_source_font_kerning_pair_count,&_builtin_source_font_kerning_pairs[0][0],_builtin_source_font_img_width,_builtin_source_font_img_height,_builtin_source_font_img_data);
Ref<Font> large_font=make_font2(_builtin_large_font_height,_builtin_large_font_ascent,_builtin_large_font_charcount,&_builtin_large_font_charrects[0][0],_builtin_large_font_kerning_pair_count,&_builtin_large_font_kerning_pairs[0][0],_builtin_large_font_img_width,_builtin_large_font_img_height,_builtin_large_font_img_data);

Expand All @@ -199,7 +199,7 @@ void make_default_theme() {
Color control_font_color_low = Color::html("b0b0b0");
Color control_font_color_hover = Color::html("f0f0f0");
Color control_font_color_disabled = Color(0.9,0.9,0.9,0.2);
Color control_font_color_pressed = Color::html("ffffff");
Color control_font_color_pressed = Color::html("7cc9ff");
Color font_color_selection = Color::html("7d7d7d");


Expand Down Expand Up @@ -455,7 +455,7 @@ void make_default_theme() {
t->set_stylebox("focus","TextEdit", focus );
t->set_stylebox("completion","TextEdit", make_stylebox( tree_bg_png,3,3,3,3) );

t->set_icon("tab","TextEdit", make_icon( tab_png) );
t->set_icon("tab","TextEdit", make_icon(tab_png) );

t->set_font("font","TextEdit", default_font );

Expand Down Expand Up @@ -654,7 +654,7 @@ void make_default_theme() {
t->set_color("font_color_selected","Tree", control_font_color_pressed );
t->set_color("selection_color","Tree", Color(0.1,0.1,1,0.8) );
t->set_color("cursor_color","Tree", Color(0,0,0) );
t->set_color("guide_color","Tree", Color(0,0,0,0.1) );
t->set_color("guide_color","Tree", Color(0,0,0,0) );

t->set_constant("hseparation","Tree",4);
t->set_constant("vseparation","Tree",4);
Expand Down Expand Up @@ -690,14 +690,14 @@ void make_default_theme() {


// TabContainer

Ref<StyleBoxTexture> tc_sb = sb_expand( make_stylebox( tab_container_bg_png,4,4,4,4,4,4,4,4),3,3,3,3);
//toger 4 4 4 4
Ref<StyleBoxTexture> tc_sb = sb_expand( make_stylebox( tab_container_bg_png,4,4,4,4,0,4,0,0),0,0,0,0);

tc_sb->set_expand_margin_size(MARGIN_TOP,2);
tc_sb->set_default_margin(MARGIN_TOP,8);

t->set_stylebox("tab_fg","TabContainer", sb_expand( make_stylebox( tab_current_png,4,4,4,1,16,4,16,4),2,2,2,2) );
t->set_stylebox("tab_bg","TabContainer", sb_expand( make_stylebox( tab_behind_png,5,5,5,1,16,6,16,4),3,0,3,3) );
tc_sb->set_default_margin(MARGIN_TOP,0);
//toger 16 4 16 4 2 2 2 2
t->set_stylebox("tab_fg","TabContainer", sb_expand( make_stylebox( tab_current_png,4,4,4,1,16,2,16,5),0,3,0,3) );
t->set_stylebox("tab_bg","TabContainer", sb_expand( make_stylebox( tab_behind_png, 5,5,5,1,16,2,16,5),0,3,0,3) );
t->set_stylebox("panel","TabContainer", tc_sb );

t->set_icon("increment","TabContainer",make_icon( scroll_button_right_png));
Expand All @@ -712,7 +712,7 @@ void make_default_theme() {
t->set_color("font_color_fg","TabContainer", control_font_color_hover );
t->set_color("font_color_bg","TabContainer", control_font_color_low );

t->set_constant("side_margin","TabContainer", 8 );
//t->set_constant("side_margin","TabContainer", 8 );//war 8
t->set_constant("top_margin","TabContainer", 24);
t->set_constant("label_valign_fg","TabContainer", 0);
t->set_constant("label_valign_bg","TabContainer", 2);
Expand All @@ -721,9 +721,9 @@ void make_default_theme() {


// Tabs

t->set_stylebox("tab_fg","Tabs", sb_expand( make_stylebox( tab_current_png,4,3,4,1,16,3,16,2),2,2,2,2) );
t->set_stylebox("tab_bg","Tabs", sb_expand( make_stylebox( tab_behind_png,5,4,5,1,16,5,16,2),3,3,3,3) );
//toger 2,2,2,2
t->set_stylebox("tab_fg","Tabs", sb_expand( make_stylebox( tab_current_png,4,4,4,1,16,1,16,2),0,3,0,3) );
t->set_stylebox("tab_bg","Tabs", sb_expand( make_stylebox( tab_behind_png, 4,4,4,1,16,1,16,2),0,3,0,3) );
t->set_stylebox("panel","Tabs",tc_sb );
t->set_stylebox("button_pressed","Tabs", make_stylebox( button_pressed_png,4,4,4,4) );
t->set_stylebox("button","Tabs", make_stylebox( button_normal_png,4,4,4,4) );
Expand All @@ -735,6 +735,7 @@ void make_default_theme() {
t->set_icon("close","Tabs",make_icon( tab_close_png));

t->set_font("font","Tabs", default_font );
t->set_font("bold_font", "Tabs", default_font);

t->set_color("font_color_fg","Tabs", control_font_color_hover );
t->set_color("font_color_bg","Tabs", control_font_color_low );
Expand Down Expand Up @@ -887,11 +888,11 @@ void make_default_theme() {
Ref<StyleBoxTexture> ttnc = make_stylebox( full_panel_bg_png,8,8,8,8);
ttnc->set_draw_center(false);

t->set_stylebox("border","ReferenceFrame", make_stylebox( reference_border_png,4,4,4,4) );
t->set_stylebox("border","ReferenceFrame", make_stylebox( reference_border_png,4,4,4,0) );
t->set_stylebox("panelnc","Panel", ttnc );
t->set_stylebox("panelf","Panel", tc_sb );

Ref<StyleBoxTexture> sb_pc = make_stylebox( tab_container_bg_png,4,4,4,4,7,7,7,7);
//toger 7 7 7 7
Ref<StyleBoxTexture> sb_pc = make_stylebox( tab_container_bg_png,4,4,4,4,0,0,0,0);
t->set_stylebox("panel","PanelContainer", sb_pc );


Expand Down Expand Up @@ -956,6 +957,3 @@ void clear_default_theme() {
Theme::set_default_font( Ref< Font >() );

}



Binary file modified scene/resources/default_theme/focus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/frame_focus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/full_panel_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/graph_node.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/graph_node_close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/graph_node_default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/graph_node_default_focus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/graph_node_selected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/graph_port.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/hseparator.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/hslider_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/hslider_grabber.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/hslider_grabber_hl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/hsplitter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/icon_close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scene/resources/default_theme/icon_color_pick.png
Binary file modified scene/resources/default_theme/line_edit.png
Binary file modified scene/resources/default_theme/line_edit_disabled.png
Binary file modified scene/resources/default_theme/option_button_hover.png
Binary file modified scene/resources/default_theme/option_button_normal.png
Binary file modified scene/resources/default_theme/option_button_pressed.png
Binary file modified scene/resources/default_theme/panel_bg.png
Binary file modified scene/resources/default_theme/popup_bg.png
Binary file modified scene/resources/default_theme/popup_window.png
Binary file modified scene/resources/default_theme/progress_bar.png
Binary file modified scene/resources/default_theme/progress_fill.png
Binary file modified scene/resources/default_theme/radio_checked.png
Binary file modified scene/resources/default_theme/radio_unchecked.png
Binary file modified scene/resources/default_theme/scroll_bg.png
Binary file modified scene/resources/default_theme/scroll_grabber.png
Binary file modified scene/resources/default_theme/scroll_grabber_hl.png
Binary file modified scene/resources/default_theme/selection.png
Binary file modified scene/resources/default_theme/selection_oof.png
Binary file modified scene/resources/default_theme/tab_behind.png
Binary file modified scene/resources/default_theme/tab_close.png
Binary file modified scene/resources/default_theme/tab_container_bg.png
Binary file modified scene/resources/default_theme/tab_current.png

0 comments on commit 5e97449

Please sign in to comment.