Browse Source

Fix typo in theming methods ("botton" -> "bottom")

(cherry picked from commit 1f9cac1717899d858c0497c64e9363cd8a037395)
Hugo Locurcio 4 years ago
parent
commit
7133603238

+ 3 - 3
editor/editor_themes.cpp

@@ -40,16 +40,16 @@
 #include "modules/svg/image_loader_svg.h"
 #include "modules/svg/image_loader_svg.h"
 #endif
 #endif
 
 
-static Ref<StyleBoxTexture> make_stylebox(Ref<Texture> p_texture, float p_left, float p_top, float p_right, float p_botton, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_botton = -1, bool p_draw_center = true) {
+static Ref<StyleBoxTexture> make_stylebox(Ref<Texture> p_texture, float p_left, float p_top, float p_right, float p_bottom, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1, bool p_draw_center = true) {
 	Ref<StyleBoxTexture> style(memnew(StyleBoxTexture));
 	Ref<StyleBoxTexture> style(memnew(StyleBoxTexture));
 	style->set_texture(p_texture);
 	style->set_texture(p_texture);
 	style->set_margin_size(MARGIN_LEFT, p_left * EDSCALE);
 	style->set_margin_size(MARGIN_LEFT, p_left * EDSCALE);
 	style->set_margin_size(MARGIN_RIGHT, p_right * EDSCALE);
 	style->set_margin_size(MARGIN_RIGHT, p_right * EDSCALE);
-	style->set_margin_size(MARGIN_BOTTOM, p_botton * EDSCALE);
+	style->set_margin_size(MARGIN_BOTTOM, p_bottom * EDSCALE);
 	style->set_margin_size(MARGIN_TOP, p_top * EDSCALE);
 	style->set_margin_size(MARGIN_TOP, p_top * EDSCALE);
 	style->set_default_margin(MARGIN_LEFT, p_margin_left * EDSCALE);
 	style->set_default_margin(MARGIN_LEFT, p_margin_left * EDSCALE);
 	style->set_default_margin(MARGIN_RIGHT, p_margin_right * EDSCALE);
 	style->set_default_margin(MARGIN_RIGHT, p_margin_right * EDSCALE);
-	style->set_default_margin(MARGIN_BOTTOM, p_margin_botton * EDSCALE);
+	style->set_default_margin(MARGIN_BOTTOM, p_margin_bottom * EDSCALE);
 	style->set_default_margin(MARGIN_TOP, p_margin_top * EDSCALE);
 	style->set_default_margin(MARGIN_TOP, p_margin_top * EDSCALE);
 	style->set_draw_center(p_draw_center);
 	style->set_draw_center(p_draw_center);
 	return style;
 	return style;

+ 7 - 7
scene/resources/default_theme/default_theme.cpp

@@ -44,7 +44,7 @@ static TexCacheMap *tex_cache;
 static float scale = 1;
 static float scale = 1;
 
 
 template <class T>
 template <class T>
-static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, float p_right, float p_botton, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_botton = -1, bool p_draw_center = true) {
+static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, float p_right, float p_bottom, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1, bool p_draw_center = true) {
 
 
 	Ref<ImageTexture> texture;
 	Ref<ImageTexture> texture;
 
 
@@ -77,11 +77,11 @@ static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, fl
 	style->set_texture(texture);
 	style->set_texture(texture);
 	style->set_margin_size(MARGIN_LEFT, p_left * scale);
 	style->set_margin_size(MARGIN_LEFT, p_left * scale);
 	style->set_margin_size(MARGIN_RIGHT, p_right * scale);
 	style->set_margin_size(MARGIN_RIGHT, p_right * scale);
-	style->set_margin_size(MARGIN_BOTTOM, p_botton * scale);
+	style->set_margin_size(MARGIN_BOTTOM, p_bottom * scale);
 	style->set_margin_size(MARGIN_TOP, p_top * scale);
 	style->set_margin_size(MARGIN_TOP, p_top * scale);
 	style->set_default_margin(MARGIN_LEFT, p_margin_left * scale);
 	style->set_default_margin(MARGIN_LEFT, p_margin_left * scale);
 	style->set_default_margin(MARGIN_RIGHT, p_margin_right * scale);
 	style->set_default_margin(MARGIN_RIGHT, p_margin_right * scale);
-	style->set_default_margin(MARGIN_BOTTOM, p_margin_botton * scale);
+	style->set_default_margin(MARGIN_BOTTOM, p_margin_bottom * scale);
 	style->set_default_margin(MARGIN_TOP, p_margin_top * scale);
 	style->set_default_margin(MARGIN_TOP, p_margin_top * scale);
 	style->set_draw_center(p_draw_center);
 	style->set_draw_center(p_draw_center);
 
 
@@ -99,12 +99,12 @@ static Ref<StyleBoxFlat> make_flat_stylebox(Color p_color, float p_margin_left =
 	return style;
 	return style;
 }
 }
 
 
-static Ref<StyleBoxTexture> sb_expand(Ref<StyleBoxTexture> p_sbox, float p_left, float p_top, float p_right, float p_botton) {
+static Ref<StyleBoxTexture> sb_expand(Ref<StyleBoxTexture> p_sbox, float p_left, float p_top, float p_right, float p_bottom) {
 
 
 	p_sbox->set_expand_margin_size(MARGIN_LEFT, p_left * scale);
 	p_sbox->set_expand_margin_size(MARGIN_LEFT, p_left * scale);
 	p_sbox->set_expand_margin_size(MARGIN_TOP, p_top * scale);
 	p_sbox->set_expand_margin_size(MARGIN_TOP, p_top * scale);
 	p_sbox->set_expand_margin_size(MARGIN_RIGHT, p_right * scale);
 	p_sbox->set_expand_margin_size(MARGIN_RIGHT, p_right * scale);
-	p_sbox->set_expand_margin_size(MARGIN_BOTTOM, p_botton * scale);
+	p_sbox->set_expand_margin_size(MARGIN_BOTTOM, p_bottom * scale);
 	return p_sbox;
 	return p_sbox;
 }
 }
 
 
@@ -188,13 +188,13 @@ static Ref<BitmapFont> make_font(int p_height, int p_ascent, int p_charcount, co
 	return font;
 	return font;
 }
 }
 
 
-static Ref<StyleBox> make_empty_stylebox(float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_botton = -1) {
+static Ref<StyleBox> make_empty_stylebox(float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
 
 
 	Ref<StyleBox> style(memnew(StyleBoxEmpty));
 	Ref<StyleBox> style(memnew(StyleBoxEmpty));
 
 
 	style->set_default_margin(MARGIN_LEFT, p_margin_left * scale);
 	style->set_default_margin(MARGIN_LEFT, p_margin_left * scale);
 	style->set_default_margin(MARGIN_RIGHT, p_margin_right * scale);
 	style->set_default_margin(MARGIN_RIGHT, p_margin_right * scale);
-	style->set_default_margin(MARGIN_BOTTOM, p_margin_botton * scale);
+	style->set_default_margin(MARGIN_BOTTOM, p_margin_bottom * scale);
 	style->set_default_margin(MARGIN_TOP, p_margin_top * scale);
 	style->set_default_margin(MARGIN_TOP, p_margin_top * scale);
 
 
 	return style;
 	return style;

+ 2 - 2
scene/resources/style_box.cpp

@@ -440,10 +440,10 @@ void StyleBoxFlat::set_corner_radius_all(int radius) {
 
 
 	emit_changed();
 	emit_changed();
 }
 }
-void StyleBoxFlat::set_corner_radius_individual(const int radius_top_left, const int radius_top_right, const int radius_botton_right, const int radius_bottom_left) {
+void StyleBoxFlat::set_corner_radius_individual(const int radius_top_left, const int radius_top_right, const int radius_bottom_right, const int radius_bottom_left) {
 	corner_radius[0] = radius_top_left;
 	corner_radius[0] = radius_top_left;
 	corner_radius[1] = radius_top_right;
 	corner_radius[1] = radius_top_right;
-	corner_radius[2] = radius_botton_right;
+	corner_radius[2] = radius_bottom_right;
 	corner_radius[3] = radius_bottom_left;
 	corner_radius[3] = radius_bottom_left;
 
 
 	emit_changed();
 	emit_changed();

+ 1 - 1
scene/resources/style_box.h

@@ -191,7 +191,7 @@ public:
 
 
 	//CORNER
 	//CORNER
 	void set_corner_radius_all(int radius);
 	void set_corner_radius_all(int radius);
-	void set_corner_radius_individual(const int radius_top_left, const int radius_top_right, const int radius_botton_right, const int radius_bottom_left);
+	void set_corner_radius_individual(const int radius_top_left, const int radius_top_right, const int radius_bottom_right, const int radius_bottom_left);
 	int get_corner_radius_min() const;
 	int get_corner_radius_min() const;
 
 
 	void set_corner_radius(Corner p_corner, const int radius);
 	void set_corner_radius(Corner p_corner, const int radius);