summaryrefslogtreecommitdiff
path: root/scene/resources/default_theme
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/default_theme')
-rw-r--r--scene/resources/default_theme/default_theme.cpp404
-rw-r--r--scene/resources/default_theme/default_theme.h4
-rw-r--r--scene/resources/default_theme/icon_grid_minimap.pngbin0 -> 640 bytes
-rw-r--r--scene/resources/default_theme/theme_data.h4
-rwxr-xr-xscene/resources/default_theme/xpmfix.sh2
5 files changed, 265 insertions, 149 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 85cd0f9bb4..ddf1fc3db4 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -43,10 +43,10 @@
typedef Map<const void *, Ref<ImageTexture>> TexCacheMap;
static TexCacheMap *tex_cache;
-static float scale = 1;
+static float scale = 1.0;
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;
if (tex_cache->has(p_src)) {
@@ -64,24 +64,35 @@ static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, fl
Ref<StyleBoxTexture> style(memnew(StyleBoxTexture));
style->set_texture(texture);
- style->set_margin_size(MARGIN_LEFT, p_left * scale);
- style->set_margin_size(MARGIN_RIGHT, p_right * scale);
- style->set_margin_size(MARGIN_BOTTOM, p_botton * 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_RIGHT, p_margin_right * scale);
- style->set_default_margin(MARGIN_BOTTOM, p_margin_botton * scale);
- style->set_default_margin(MARGIN_TOP, p_margin_top * scale);
+ style->set_margin_size(SIDE_LEFT, p_left * scale);
+ style->set_margin_size(SIDE_RIGHT, p_right * scale);
+ style->set_margin_size(SIDE_BOTTOM, p_bottom * scale);
+ style->set_margin_size(SIDE_TOP, p_top * scale);
+ style->set_default_margin(SIDE_LEFT, p_margin_left * scale);
+ style->set_default_margin(SIDE_RIGHT, p_margin_right * scale);
+ style->set_default_margin(SIDE_BOTTOM, p_margin_bottom * scale);
+ style->set_default_margin(SIDE_TOP, p_margin_top * scale);
style->set_draw_center(p_draw_center);
return style;
}
-static Ref<StyleBoxTexture> sb_expand(Ref<StyleBoxTexture> p_sbox, float p_left, float p_top, float p_right, float p_botton) {
- 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_RIGHT, p_right * scale);
- p_sbox->set_expand_margin_size(MARGIN_BOTTOM, p_botton * scale);
+static Ref<StyleBoxFlat> make_flat_stylebox(Color p_color, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
+ Ref<StyleBoxFlat> style(memnew(StyleBoxFlat));
+ style->set_bg_color(p_color);
+ style->set_default_margin(SIDE_LEFT, p_margin_left * scale);
+ style->set_default_margin(SIDE_RIGHT, p_margin_right * scale);
+ style->set_default_margin(SIDE_BOTTOM, p_margin_bottom * scale);
+ style->set_default_margin(SIDE_TOP, p_margin_top * scale);
+
+ return style;
+}
+
+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(SIDE_LEFT, p_left * scale);
+ p_sbox->set_expand_margin_size(SIDE_TOP, p_top * scale);
+ p_sbox->set_expand_margin_size(SIDE_RIGHT, p_right * scale);
+ p_sbox->set_expand_margin_size(SIDE_BOTTOM, p_bottom * scale);
return p_sbox;
}
@@ -97,13 +108,65 @@ static Ref<Texture2D> make_icon(T p_src) {
return texture;
}
-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<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false, bool p_flip_x = false) {
+ if (!p_flip_y && !p_flip_x) {
+ return p_texture;
+ }
+
+ Ref<ImageTexture> texture(memnew(ImageTexture));
+ Ref<Image> img = p_texture->get_data();
+ img = img->duplicate();
+
+ if (p_flip_y) {
+ img->flip_y();
+ }
+ if (p_flip_x) {
+ img->flip_x();
+ }
+
+ texture->create_from_image(img);
+ return texture;
+}
+
+static Ref<FontData> make_font(int p_height, int p_ascent, int p_charcount, const int *p_char_rects, int p_kerning_count, const int *p_kernings, int p_w, int p_h, const unsigned char *p_img) {
+ Ref<FontData> font(memnew(FontData));
+ font->new_bitmap(p_height, p_ascent, p_height);
+
+ Ref<Image> image = memnew(Image(p_img));
+ Ref<ImageTexture> tex = memnew(ImageTexture);
+ tex->create_from_image(image);
+
+ font->bitmap_add_texture(tex);
+
+ for (int i = 0; i < p_charcount; i++) {
+ const int *c = &p_char_rects[i * 8];
+
+ int chr = c[0];
+ Rect2 frect;
+ frect.position.x = c[1];
+ frect.position.y = c[2];
+ frect.size.x = c[3];
+ frect.size.y = c[4];
+ Point2 align(c[6], c[5]);
+ int advance = c[7];
+
+ font->bitmap_add_char(chr, 0, frect, align, advance);
+ }
+
+ for (int i = 0; i < p_kerning_count; i++) {
+ font->bitmap_add_kerning_pair(p_kernings[i * 3 + 0], p_kernings[i * 3 + 1], p_kernings[i * 3 + 2]);
+ }
+
+ 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_bottom = -1) {
Ref<StyleBox> style(memnew(StyleBoxEmpty));
- 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_BOTTOM, p_margin_botton * scale);
- style->set_default_margin(MARGIN_TOP, p_margin_top * scale);
+ style->set_default_margin(SIDE_LEFT, p_margin_left * scale);
+ style->set_default_margin(SIDE_RIGHT, p_margin_right * scale);
+ style->set_default_margin(SIDE_BOTTOM, p_margin_bottom * scale);
+ style->set_default_margin(SIDE_TOP, p_margin_top * scale);
return style;
}
@@ -116,12 +179,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// Font Colors
Color control_font_color = Color(0.88, 0.88, 0.88);
- Color control_font_color_lower = Color(0.63, 0.63, 0.63);
- Color control_font_color_low = Color(0.69, 0.69, 0.69);
- Color control_font_color_hover = Color(0.94, 0.94, 0.94);
- Color control_font_color_disabled = Color(0.9, 0.9, 0.9, 0.2);
- Color control_font_color_pressed = Color(1, 1, 1);
- Color font_color_selection = Color(0.49, 0.49, 0.49);
+ Color control_font_lower_color = Color(0.63, 0.63, 0.63);
+ Color control_font_low_color = Color(0.69, 0.69, 0.69);
+ Color control_font_hover_color = Color(0.94, 0.94, 0.94);
+ Color control_font_disabled_color = Color(0.9, 0.9, 0.9, 0.2);
+ Color control_font_pressed_color = Color(1, 1, 1);
+
+ Color control_selection_color = Color(0.49, 0.49, 0.49);
// Panel
@@ -132,7 +196,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
Ref<StyleBoxTexture> focus = make_stylebox(focus_png, 5, 5, 5, 5);
for (int i = 0; i < 4; i++) {
- focus->set_expand_margin_size(Margin(i), 1 * scale);
+ focus->set_expand_margin_size(Side(i), 1 * scale);
}
// Button
@@ -154,10 +218,17 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("outline_size", "Button", 0 * scale);
theme->set_color("font_color", "Button", control_font_color);
- theme->set_color("font_color_pressed", "Button", control_font_color_pressed);
- theme->set_color("font_color_hover", "Button", control_font_color_hover);
- theme->set_color("font_color_disabled", "Button", control_font_color_disabled);
- theme->set_color("font_outline_modulate", "Button", Color(1, 1, 1));
+ theme->set_color("font_pressed_color", "Button", control_font_pressed_color);
+ theme->set_color("font_hover_color", "Button", control_font_hover_color);
+ theme->set_color("font_hover_pressed_color", "Button", control_font_pressed_color);
+ theme->set_color("font_disabled_color", "Button", control_font_disabled_color);
+ theme->set_color("font_outline_color", "Button", Color(1, 1, 1));
+
+ theme->set_color("icon_normal_color", "Button", Color(1, 1, 1, 1));
+ theme->set_color("icon_pressed_color", "Button", Color(1, 1, 1, 1));
+ theme->set_color("icon_hover_color", "Button", Color(1, 1, 1, 1));
+ theme->set_color("icon_hover_pressed_color", "Button", Color(1, 1, 1, 1));
+ theme->set_color("icon_disabled_color", "Button", Color(1, 1, 1, 1));
theme->set_constant("hseparation", "Button", 2 * scale);
@@ -169,9 +240,11 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "LinkButton", -1);
theme->set_color("font_color", "LinkButton", control_font_color);
- theme->set_color("font_color_pressed", "LinkButton", control_font_color_pressed);
- theme->set_color("font_color_hover", "LinkButton", control_font_color_hover);
+ theme->set_color("font_pressed_color", "LinkButton", control_font_pressed_color);
+ theme->set_color("font_hover_color", "LinkButton", control_font_hover_color);
+ theme->set_color("font_outline_color", "LinkButton", Color(1, 1, 1));
+ theme->set_constant("outline_size", "LinkButton", 0);
theme->set_constant("underline_spacing", "LinkButton", 2 * scale);
// ColorPickerButton
@@ -186,11 +259,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "ColorPickerButton", -1);
theme->set_color("font_color", "ColorPickerButton", Color(1, 1, 1, 1));
- theme->set_color("font_color_pressed", "ColorPickerButton", Color(0.8, 0.8, 0.8, 1));
- theme->set_color("font_color_hover", "ColorPickerButton", Color(1, 1, 1, 1));
- theme->set_color("font_color_disabled", "ColorPickerButton", Color(0.9, 0.9, 0.9, 0.3));
+ theme->set_color("font_pressed_color", "ColorPickerButton", Color(0.8, 0.8, 0.8, 1));
+ theme->set_color("font_hover_color", "ColorPickerButton", Color(1, 1, 1, 1));
+ theme->set_color("font_disabled_color", "ColorPickerButton", Color(0.9, 0.9, 0.9, 0.3));
+ theme->set_color("font_outline_color", "ColorPickerButton", Color(1, 1, 1));
theme->set_constant("hseparation", "ColorPickerButton", 2 * scale);
+ theme->set_constant("outline_size", "ColorPickerButton", 0);
// OptionButton
@@ -223,12 +298,14 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "OptionButton", -1);
theme->set_color("font_color", "OptionButton", control_font_color);
- theme->set_color("font_color_pressed", "OptionButton", control_font_color_pressed);
- theme->set_color("font_color_hover", "OptionButton", control_font_color_hover);
- theme->set_color("font_color_disabled", "OptionButton", control_font_color_disabled);
+ theme->set_color("font_pressed_color", "OptionButton", control_font_pressed_color);
+ theme->set_color("font_hover_color", "OptionButton", control_font_hover_color);
+ theme->set_color("font_disabled_color", "OptionButton", control_font_disabled_color);
+ theme->set_color("font_outline_color", "OptionButton", Color(1, 1, 1));
theme->set_constant("hseparation", "OptionButton", 2 * scale);
theme->set_constant("arrow_margin", "OptionButton", 2 * scale);
+ theme->set_constant("outline_size", "OptionButton", 0);
// MenuButton
@@ -242,24 +319,26 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "MenuButton", -1);
theme->set_color("font_color", "MenuButton", control_font_color);
- theme->set_color("font_color_pressed", "MenuButton", control_font_color_pressed);
- theme->set_color("font_color_hover", "MenuButton", control_font_color_hover);
- theme->set_color("font_color_disabled", "MenuButton", Color(1, 1, 1, 0.3));
+ theme->set_color("font_pressed_color", "MenuButton", control_font_pressed_color);
+ theme->set_color("font_hover_color", "MenuButton", control_font_hover_color);
+ theme->set_color("font_disabled_color", "MenuButton", Color(1, 1, 1, 0.3));
+ theme->set_color("font_outline_color", "MenuButton", Color(1, 1, 1));
theme->set_constant("hseparation", "MenuButton", 3 * scale);
+ theme->set_constant("outline_size", "MenuButton", 0);
// CheckBox
Ref<StyleBox> cbx_empty = memnew(StyleBoxEmpty);
- cbx_empty->set_default_margin(MARGIN_LEFT, 4 * scale);
- cbx_empty->set_default_margin(MARGIN_RIGHT, 4 * scale);
- cbx_empty->set_default_margin(MARGIN_TOP, 4 * scale);
- cbx_empty->set_default_margin(MARGIN_BOTTOM, 4 * scale);
+ cbx_empty->set_default_margin(SIDE_LEFT, 4 * scale);
+ cbx_empty->set_default_margin(SIDE_RIGHT, 4 * scale);
+ cbx_empty->set_default_margin(SIDE_TOP, 4 * scale);
+ cbx_empty->set_default_margin(SIDE_BOTTOM, 4 * scale);
Ref<StyleBox> cbx_focus = focus;
- cbx_focus->set_default_margin(MARGIN_LEFT, 4 * scale);
- cbx_focus->set_default_margin(MARGIN_RIGHT, 4 * scale);
- cbx_focus->set_default_margin(MARGIN_TOP, 4 * scale);
- cbx_focus->set_default_margin(MARGIN_BOTTOM, 4 * scale);
+ cbx_focus->set_default_margin(SIDE_LEFT, 4 * scale);
+ cbx_focus->set_default_margin(SIDE_RIGHT, 4 * scale);
+ cbx_focus->set_default_margin(SIDE_TOP, 4 * scale);
+ cbx_focus->set_default_margin(SIDE_BOTTOM, 4 * scale);
theme->set_stylebox("normal", "CheckBox", cbx_empty);
theme->set_stylebox("pressed", "CheckBox", cbx_empty);
@@ -277,21 +356,23 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "CheckBox", -1);
theme->set_color("font_color", "CheckBox", control_font_color);
- theme->set_color("font_color_pressed", "CheckBox", control_font_color_pressed);
- theme->set_color("font_color_hover", "CheckBox", control_font_color_hover);
- theme->set_color("font_color_hover_pressed", "CheckBox", control_font_color_pressed);
- theme->set_color("font_color_disabled", "CheckBox", control_font_color_disabled);
+ theme->set_color("font_pressed_color", "CheckBox", control_font_pressed_color);
+ theme->set_color("font_hover_color", "CheckBox", control_font_hover_color);
+ theme->set_color("font_hover_pressed_color", "CheckBox", control_font_pressed_color);
+ theme->set_color("font_disabled_color", "CheckBox", control_font_disabled_color);
+ theme->set_color("font_outline_color", "CheckBox", Color(1, 1, 1));
theme->set_constant("hseparation", "CheckBox", 4 * scale);
theme->set_constant("check_vadjust", "CheckBox", 0 * scale);
+ theme->set_constant("outline_size", "CheckBox", 0);
// CheckButton
Ref<StyleBox> cb_empty = memnew(StyleBoxEmpty);
- cb_empty->set_default_margin(MARGIN_LEFT, 6 * scale);
- cb_empty->set_default_margin(MARGIN_RIGHT, 6 * scale);
- cb_empty->set_default_margin(MARGIN_TOP, 4 * scale);
- cb_empty->set_default_margin(MARGIN_BOTTOM, 4 * scale);
+ cb_empty->set_default_margin(SIDE_LEFT, 6 * scale);
+ cb_empty->set_default_margin(SIDE_RIGHT, 6 * scale);
+ cb_empty->set_default_margin(SIDE_TOP, 4 * scale);
+ cb_empty->set_default_margin(SIDE_BOTTOM, 4 * scale);
theme->set_stylebox("normal", "CheckButton", cb_empty);
theme->set_stylebox("pressed", "CheckButton", cb_empty);
@@ -314,13 +395,15 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "CheckButton", -1);
theme->set_color("font_color", "CheckButton", control_font_color);
- theme->set_color("font_color_pressed", "CheckButton", control_font_color_pressed);
- theme->set_color("font_color_hover", "CheckButton", control_font_color_hover);
- theme->set_color("font_color_hover_pressed", "CheckButton", control_font_color_pressed);
- theme->set_color("font_color_disabled", "CheckButton", control_font_color_disabled);
+ theme->set_color("font_pressed_color", "CheckButton", control_font_pressed_color);
+ theme->set_color("font_hover_color", "CheckButton", control_font_hover_color);
+ theme->set_color("font_hover_pressed_color", "CheckButton", control_font_pressed_color);
+ theme->set_color("font_disabled_color", "CheckButton", control_font_disabled_color);
+ theme->set_color("font_outline_color", "CheckButton", Color(1, 1, 1));
theme->set_constant("hseparation", "CheckButton", 4 * scale);
theme->set_constant("check_vadjust", "CheckButton", 0 * scale);
+ theme->set_constant("outline_size", "CheckButton", 0);
// Label
@@ -329,12 +412,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "Label", -1);
theme->set_color("font_color", "Label", Color(1, 1, 1));
- theme->set_color("font_color_shadow", "Label", Color(0, 0, 0, 0));
- theme->set_color("font_outline_modulate", "Label", Color(1, 1, 1));
+ theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0));
+ theme->set_color("font_outline_color", "Label", Color(1, 1, 1));
theme->set_constant("shadow_offset_x", "Label", 1 * scale);
theme->set_constant("shadow_offset_y", "Label", 1 * scale);
- theme->set_constant("outline_size", "Label", 0 * scale);
+ theme->set_constant("outline_size", "Label", 0);
theme->set_constant("shadow_outline_size", "Label", 1 * scale);
theme->set_constant("line_spacing", "Label", 3 * scale);
@@ -348,14 +431,16 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "LineEdit", -1);
theme->set_color("font_color", "LineEdit", control_font_color);
- theme->set_color("font_color_selected", "LineEdit", Color(0, 0, 0));
- theme->set_color("font_color_uneditable", "LineEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
- theme->set_color("cursor_color", "LineEdit", control_font_color_hover);
- theme->set_color("selection_color", "LineEdit", font_color_selection);
+ theme->set_color("font_selected_color", "LineEdit", Color(0, 0, 0));
+ theme->set_color("font_uneditable_color", "LineEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
+ theme->set_color("font_outline_color", "LineEdit", Color(1, 1, 1));
+ theme->set_color("cursor_color", "LineEdit", control_font_hover_color);
+ theme->set_color("selection_color", "LineEdit", control_selection_color);
theme->set_color("clear_button_color", "LineEdit", control_font_color);
- theme->set_color("clear_button_color_pressed", "LineEdit", control_font_color_pressed);
+ theme->set_color("clear_button_color_pressed", "LineEdit", control_font_pressed_color);
- theme->set_constant("minimum_spaces", "LineEdit", 12 * scale);
+ theme->set_constant("minimum_character_width", "LineEdit", 4);
+ theme->set_constant("outline_size", "LineEdit", 0);
theme->set_icon("clear", "LineEdit", make_icon(line_edit_clear_png));
@@ -367,8 +452,11 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "ProgressBar", Ref<Font>());
theme->set_font_size("font_size", "ProgressBar", -1);
- theme->set_color("font_color", "ProgressBar", control_font_color_hover);
- theme->set_color("font_color_shadow", "ProgressBar", Color(0, 0, 0));
+ theme->set_color("font_color", "ProgressBar", control_font_hover_color);
+ theme->set_color("font_shadow_color", "ProgressBar", Color(0, 0, 0));
+ theme->set_color("font_outline_color", "ProgressBar", Color(1, 1, 1));
+
+ theme->set_constant("outline_size", "ProgressBar", 0);
// TextEdit
@@ -387,12 +475,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("completion_background_color", "TextEdit", Color(0.17, 0.16, 0.2));
theme->set_color("completion_selected_color", "TextEdit", Color(0.26, 0.26, 0.27));
theme->set_color("completion_existing_color", "TextEdit", Color(0.87, 0.87, 0.87, 0.13));
- theme->set_color("completion_scroll_color", "TextEdit", control_font_color_pressed);
+ theme->set_color("completion_scroll_color", "TextEdit", control_font_pressed_color);
theme->set_color("completion_font_color", "TextEdit", Color(0.67, 0.67, 0.67));
theme->set_color("font_color", "TextEdit", control_font_color);
- theme->set_color("font_color_selected", "TextEdit", Color(0, 0, 0));
- theme->set_color("font_color_readonly", "TextEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
- theme->set_color("selection_color", "TextEdit", font_color_selection);
+ theme->set_color("font_selected_color", "TextEdit", Color(0, 0, 0));
+ theme->set_color("font_readonly_color", "TextEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
+ theme->set_color("font_outline_color", "TextEdit", Color(1, 1, 1));
+ theme->set_color("selection_color", "TextEdit", control_selection_color);
theme->set_color("mark_color", "TextEdit", Color(1.0, 0.4, 0.4, 0.4));
theme->set_color("code_folding_color", "TextEdit", Color(0.8, 0.8, 0.8, 0.8));
theme->set_color("current_line_color", "TextEdit", Color(0.25, 0.25, 0.26, 0.8));
@@ -405,8 +494,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("completion_max_width", "TextEdit", 50);
theme->set_constant("completion_scroll_width", "TextEdit", 3);
theme->set_constant("line_spacing", "TextEdit", 4 * scale);
+ theme->set_constant("outline_size", "TextEdit", 0);
// CodeEdit
+
theme->set_stylebox("normal", "CodeEdit", make_stylebox(tree_bg_png, 3, 3, 3, 3, 0, 0, 0, 0));
theme->set_stylebox("focus", "CodeEdit", focus);
theme->set_stylebox("read_only", "CodeEdit", make_stylebox(tree_bg_disabled_png, 4, 4, 4, 4, 0, 0, 0, 0));
@@ -427,12 +518,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("completion_background_color", "CodeEdit", Color(0.17, 0.16, 0.2));
theme->set_color("completion_selected_color", "CodeEdit", Color(0.26, 0.26, 0.27));
theme->set_color("completion_existing_color", "CodeEdit", Color(0.87, 0.87, 0.87, 0.13));
- theme->set_color("completion_scroll_color", "CodeEdit", control_font_color_pressed);
+ theme->set_color("completion_scroll_color", "CodeEdit", control_font_pressed_color);
theme->set_color("completion_font_color", "CodeEdit", Color(0.67, 0.67, 0.67));
theme->set_color("font_color", "CodeEdit", control_font_color);
- theme->set_color("font_color_selected", "CodeEdit", Color(0, 0, 0));
- theme->set_color("font_color_readonly", "CodeEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
- theme->set_color("selection_color", "CodeEdit", font_color_selection);
+ theme->set_color("font_selected_color", "CodeEdit", Color(0, 0, 0));
+ theme->set_color("font_readonly_color", "CodeEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
+ theme->set_color("font_outline_color", "CodeEdit", Color(1, 1, 1));
+ theme->set_color("selection_color", "CodeEdit", control_selection_color);
theme->set_color("mark_color", "CodeEdit", Color(1.0, 0.4, 0.4, 0.4));
theme->set_color("bookmark_color", "CodeEdit", Color(0.5, 0.64, 1, 0.8));
theme->set_color("breakpoint_color", "CodeEdit", Color(0.9, 0.29, 0.3));
@@ -450,6 +542,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("completion_max_width", "CodeEdit", 50);
theme->set_constant("completion_scroll_width", "CodeEdit", 3);
theme->set_constant("line_spacing", "CodeEdit", 4 * scale);
+ theme->set_constant("outline_size", "CodeEdit", 0);
Ref<Texture2D> empty_icon = memnew(ImageTexture);
@@ -505,7 +598,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("updown", "SpinBox", make_icon(spinbox_updown_png));
- //scroll container
+ // ScrollContainer
+
Ref<StyleBoxEmpty> empty;
empty.instance();
theme->set_stylebox("bg", "ScrollContainer", empty);
@@ -517,7 +611,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("scaleborder_size", "Window", 4 * scale);
theme->set_font("title_font", "Window", large_font);
+ theme->set_font_size("title_font_size", "Window", -1);
+
theme->set_color("title_color", "Window", Color(0, 0, 0));
+ theme->set_color("title_outline_modulate", "Window", Color(1, 1, 1));
+
+ theme->set_constant("title_outline_size", "Window", 0);
theme->set_constant("title_height", "Window", 20 * scale);
theme->set_constant("resize_margin", "Window", 4 * scale);
@@ -538,7 +637,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
Ref<StyleBoxTexture> selected = make_stylebox(selection_png, 6, 6, 6, 6);
for (int i = 0; i < 4; i++) {
- selected->set_expand_margin_size(Margin(i), 2 * scale);
+ selected->set_expand_margin_size(Side(i), 2 * scale);
}
theme->set_stylebox("panel", "PopupPanel", style_pp);
@@ -568,13 +667,17 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "PopupMenu", -1);
theme->set_color("font_color", "PopupMenu", control_font_color);
- theme->set_color("font_color_accel", "PopupMenu", Color(0.7, 0.7, 0.7, 0.8));
- theme->set_color("font_color_disabled", "PopupMenu", Color(0.4, 0.4, 0.4, 0.8));
- theme->set_color("font_color_hover", "PopupMenu", control_font_color);
- theme->set_color("font_color_separator", "PopupMenu", control_font_color);
+ theme->set_color("font_accelerator_color", "PopupMenu", Color(0.7, 0.7, 0.7, 0.8));
+ theme->set_color("font_disabled_color", "PopupMenu", Color(0.4, 0.4, 0.4, 0.8));
+ theme->set_color("font_hover_color", "PopupMenu", control_font_color);
+ theme->set_color("font_separator_color", "PopupMenu", control_font_color);
+ theme->set_color("font_outline_color", "PopupMenu", Color(1, 1, 1));
theme->set_constant("hseparation", "PopupMenu", 4 * scale);
theme->set_constant("vseparation", "PopupMenu", 4 * scale);
+ theme->set_constant("outline_size", "PopupMenu", 0);
+ theme->set_constant("item_start_padding", "PopupMenu", 2 * scale);
+ theme->set_constant("item_end_padding", "PopupMenu", 2 * scale);
// GraphNode
@@ -587,8 +690,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
Ref<StyleBoxTexture> graph_bpoint = make_stylebox(graph_node_breakpoint_png, 6, 24, 6, 5, 16, 24, 16, 6);
Ref<StyleBoxTexture> graph_position = make_stylebox(graph_node_position_png, 6, 24, 6, 5, 16, 24, 16, 6);
- //graphsb->set_expand_margin_size(MARGIN_LEFT,10);
- //graphsb->set_expand_margin_size(MARGIN_RIGHT,10);
+ //graphsb->set_expand_margin_size(SIDE_LEFT,10);
+ //graphsb->set_expand_margin_size(SIDE_RIGHT,10);
theme->set_stylebox("frame", "GraphNode", graphsb);
theme->set_stylebox("selectedframe", "GraphNode", graphsbselected);
theme->set_stylebox("defaultframe", "GraphNode", graphsbdefault);
@@ -641,12 +744,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "Tree", -1);
theme->set_color("title_button_color", "Tree", control_font_color);
- theme->set_color("font_color", "Tree", control_font_color_low);
- theme->set_color("font_color_selected", "Tree", control_font_color_pressed);
+ theme->set_color("font_color", "Tree", control_font_low_color);
+ theme->set_color("font_selected_color", "Tree", control_font_pressed_color);
+ theme->set_color("font_outline_color", "Tree", Color(1, 1, 1));
theme->set_color("guide_color", "Tree", Color(0, 0, 0, 0.1));
theme->set_color("drop_position_color", "Tree", Color(1, 0.3, 0.2));
theme->set_color("relationship_line_color", "Tree", Color(0.27, 0.27, 0.27));
- theme->set_color("custom_button_font_highlight", "Tree", control_font_color_hover);
+ theme->set_color("custom_button_font_highlight", "Tree", control_font_hover_color);
theme->set_constant("hseparation", "Tree", 4 * scale);
theme->set_constant("vseparation", "Tree", 4 * scale);
@@ -656,8 +760,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("draw_guides", "Tree", 1);
theme->set_constant("scroll_border", "Tree", 4);
theme->set_constant("scroll_speed", "Tree", 12);
+ theme->set_constant("outline_size", "Tree", 0);
// ItemList
+
Ref<StyleBoxTexture> item_selected = make_stylebox(selection_png, 4, 4, 4, 4, 8, 2, 8, 2);
Ref<StyleBoxTexture> item_selected_oof = make_stylebox(selection_oof_png, 4, 4, 4, 4, 8, 2, 8, 2);
@@ -671,23 +777,26 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "ItemList", Ref<Font>());
theme->set_font_size("font_size", "ItemList", -1);
- theme->set_color("font_color", "ItemList", control_font_color_lower);
- theme->set_color("font_color_selected", "ItemList", control_font_color_pressed);
+ theme->set_color("font_color", "ItemList", control_font_lower_color);
+ theme->set_color("font_selected_color", "ItemList", control_font_pressed_color);
+ theme->set_color("font_outline_color", "ItemList", Color(1, 1, 1));
theme->set_color("guide_color", "ItemList", Color(0, 0, 0, 0.1));
theme->set_stylebox("selected", "ItemList", item_selected_oof);
theme->set_stylebox("selected_focus", "ItemList", item_selected);
theme->set_stylebox("cursor", "ItemList", focus);
theme->set_stylebox("cursor_unfocused", "ItemList", focus);
+ theme->set_constant("outline_size", "ItemList", 0);
+
// 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);
- tc_sb->set_expand_margin_size(MARGIN_TOP, 2 * scale);
- tc_sb->set_default_margin(MARGIN_TOP, 8 * scale);
+ tc_sb->set_expand_margin_size(SIDE_TOP, 2 * scale);
+ tc_sb->set_default_margin(SIDE_TOP, 8 * scale);
- theme->set_stylebox("tab_fg", "TabContainer", sb_expand(make_stylebox(tab_current_png, 4, 4, 4, 1, 16, 4, 16, 4), 2, 2, 2, 2));
- theme->set_stylebox("tab_bg", "TabContainer", sb_expand(make_stylebox(tab_behind_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3));
+ theme->set_stylebox("tab_selected", "TabContainer", sb_expand(make_stylebox(tab_current_png, 4, 4, 4, 1, 16, 4, 16, 4), 2, 2, 2, 2));
+ theme->set_stylebox("tab_unselected", "TabContainer", sb_expand(make_stylebox(tab_behind_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3));
theme->set_stylebox("tab_disabled", "TabContainer", sb_expand(make_stylebox(tab_disabled_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3));
theme->set_stylebox("panel", "TabContainer", tc_sb);
@@ -701,17 +810,19 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "TabContainer", Ref<Font>());
theme->set_font_size("font_size", "TabContainer", -1);
- theme->set_color("font_color_fg", "TabContainer", control_font_color_hover);
- theme->set_color("font_color_bg", "TabContainer", control_font_color_low);
- theme->set_color("font_color_disabled", "TabContainer", control_font_color_disabled);
+ theme->set_color("font_selected_color", "TabContainer", control_font_hover_color);
+ theme->set_color("font_unselected_color", "TabContainer", control_font_low_color);
+ theme->set_color("font_disabled_color", "TabContainer", control_font_disabled_color);
+ theme->set_color("font_outline_color", "TabContainer", Color(1, 1, 1));
theme->set_constant("side_margin", "TabContainer", 8 * scale);
theme->set_constant("icon_separation", "TabContainer", 4 * scale);
+ theme->set_constant("outline_size", "TabContainer", 0);
// Tabs
- theme->set_stylebox("tab_fg", "Tabs", sb_expand(make_stylebox(tab_current_png, 4, 3, 4, 1, 16, 3, 16, 2), 2, 2, 2, 2));
- theme->set_stylebox("tab_bg", "Tabs", sb_expand(make_stylebox(tab_behind_png, 5, 4, 5, 1, 16, 5, 16, 2), 3, 3, 3, 3));
+ theme->set_stylebox("tab_selected", "Tabs", sb_expand(make_stylebox(tab_current_png, 4, 3, 4, 1, 16, 3, 16, 2), 2, 2, 2, 2));
+ theme->set_stylebox("tab_unselected", "Tabs", sb_expand(make_stylebox(tab_behind_png, 5, 4, 5, 1, 16, 5, 16, 2), 3, 3, 3, 3));
theme->set_stylebox("tab_disabled", "Tabs", sb_expand(make_stylebox(tab_disabled_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3));
theme->set_stylebox("panel", "Tabs", tc_sb);
theme->set_stylebox("button_pressed", "Tabs", make_stylebox(button_pressed_png, 4, 4, 4, 4));
@@ -726,11 +837,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "Tabs", Ref<Font>());
theme->set_font_size("font_size", "Tabs", -1);
- theme->set_color("font_color_fg", "Tabs", control_font_color_hover);
- theme->set_color("font_color_bg", "Tabs", control_font_color_low);
- theme->set_color("font_color_disabled", "Tabs", control_font_color_disabled);
+ theme->set_color("font_selected_color", "Tabs", control_font_hover_color);
+ theme->set_color("font_unselected_color", "Tabs", control_font_low_color);
+ theme->set_color("font_disabled_color", "Tabs", control_font_disabled_color);
+ theme->set_color("font_outline_color", "Tabs", Color(1, 1, 1));
theme->set_constant("hseparation", "Tabs", 4 * scale);
+ theme->set_constant("outline_size", "Tabs", 0);
// Separators
@@ -778,7 +891,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
Ref<StyleBoxTexture> style_tt = make_stylebox(tooltip_bg_png, 4, 4, 4, 4);
for (int i = 0; i < 4; i++) {
- style_tt->set_expand_margin_size((Margin)i, 4 * scale);
+ style_tt->set_expand_margin_size((Side)i, 4 * scale);
}
theme->set_stylebox("panel", "TooltipPanel", style_tt);
@@ -787,10 +900,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "TooltipLabel", -1);
theme->set_color("font_color", "TooltipLabel", Color(0, 0, 0));
- theme->set_color("font_color_shadow", "TooltipLabel", Color(0, 0, 0, 0.1));
+ theme->set_color("font_shadow_color", "TooltipLabel", Color(0, 0, 0, 0.1));
+ theme->set_color("font_outline_color", "TooltipLabel", Color(1, 1, 1));
theme->set_constant("shadow_offset_x", "TooltipLabel", 1);
theme->set_constant("shadow_offset_y", "TooltipLabel", 1);
+ theme->set_constant("outline_size", "TooltipLabel", 0);
// RichTextLabel
@@ -803,11 +918,19 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("bold_italics_font", "RichTextLabel", Ref<Font>());
theme->set_font("mono_font", "RichTextLabel", Ref<Font>());
+ theme->set_font_size("normal_font_size", "RichTextLabel", -1);
+ theme->set_font_size("bold_font_size", "RichTextLabel", -1);
+ theme->set_font_size("italics_font_size", "RichTextLabel", -1);
+ theme->set_font_size("bold_italics_font_size", "RichTextLabel", -1);
+ theme->set_font_size("mono_font_size", "RichTextLabel", -1);
+
theme->set_color("default_color", "RichTextLabel", Color(1, 1, 1));
- theme->set_color("font_color_selected", "RichTextLabel", font_color_selection);
+ theme->set_color("font_selected_color", "RichTextLabel", Color(0, 0, 0));
theme->set_color("selection_color", "RichTextLabel", Color(0.1, 0.1, 1, 0.8));
- theme->set_color("font_color_shadow", "RichTextLabel", Color(0, 0, 0, 0));
+ theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0));
+
+ theme->set_color("font_outline_color", "RichTextLabel", Color(1, 1, 1));
theme->set_constant("shadow_offset_x", "RichTextLabel", 1 * scale);
theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * scale);
@@ -817,6 +940,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("table_hseparation", "RichTextLabel", 3 * scale);
theme->set_constant("table_vseparation", "RichTextLabel", 3 * scale);
+ theme->set_constant("outline_size", "RichTextLabel", 0);
+
+ theme->set_color("table_odd_row_bg", "RichTextLabel", Color(0, 0, 0, 0));
+ theme->set_color("table_even_row_bg", "RichTextLabel", Color(0, 0, 0, 0));
+ theme->set_color("table_border", "RichTextLabel", Color(0, 0, 0, 0));
+
// Containers
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(vsplit_bg_png, 1, 1, 1, 1));
@@ -845,6 +974,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("reset", "GraphEdit", make_icon(icon_zoom_reset_png));
theme->set_icon("more", "GraphEdit", make_icon(icon_zoom_more_png));
theme->set_icon("snap", "GraphEdit", make_icon(icon_snap_grid_png));
+ theme->set_icon("minimap", "GraphEdit", make_icon(icon_grid_minimap_png));
theme->set_stylebox("bg", "GraphEdit", make_stylebox(tree_bg_png, 4, 4, 4, 5));
theme->set_color("grid_minor", "GraphEdit", Color(1, 1, 1, 0.05));
theme->set_color("grid_major", "GraphEdit", Color(1, 1, 1, 0.2));
@@ -855,9 +985,23 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("bezier_len_neg", "GraphEdit", 160 * scale);
// Visual Node Ports
+
theme->set_constant("port_grab_distance_horizontal", "GraphEdit", 48 * scale);
theme->set_constant("port_grab_distance_vertical", "GraphEdit", 6 * scale);
+ theme->set_stylebox("bg", "GraphEditMinimap", make_flat_stylebox(Color(0.24, 0.24, 0.24), 0, 0, 0, 0));
+ Ref<StyleBoxFlat> style_minimap_camera = make_flat_stylebox(Color(0.65, 0.65, 0.65, 0.2), 0, 0, 0, 0);
+ style_minimap_camera->set_border_color(Color(0.65, 0.65, 0.65, 0.45));
+ style_minimap_camera->set_border_width_all(1);
+ theme->set_stylebox("camera", "GraphEditMinimap", style_minimap_camera);
+ Ref<StyleBoxFlat> style_minimap_node = make_flat_stylebox(Color(1, 1, 1), 0, 0, 0, 0);
+ style_minimap_node->set_corner_radius_all(2);
+ theme->set_stylebox("node", "GraphEditMinimap", style_minimap_node);
+
+ Ref<Texture2D> resizer_icon = make_icon(window_resizer_png);
+ theme->set_icon("resizer", "GraphEditMinimap", flip_icon(resizer_icon, true, true));
+ theme->set_color("resizer_color", "GraphEditMinimap", Color(1, 1, 1, 0.85));
+
// Theme
default_icon = make_icon(error_icon_png);
@@ -873,45 +1017,15 @@ void make_default_theme(bool p_hidpi, Ref<Font> p_font) {
Ref<StyleBox> default_style;
Ref<Texture2D> default_icon;
Ref<Font> default_font;
- int default_font_size = 16;
+ int default_font_size = 14;
if (p_font.is_valid()) {
default_font = p_font;
} else if (p_hidpi) {
- TextServer::BitmapFontData data;
- data.height = _hidpi_font_height;
- data.ascent = _hidpi_font_ascent;
- data.charcount = _hidpi_font_charcount;
- data.char_rects = &_hidpi_font_charrects[0][0];
- data.kerning_count = _hidpi_font_kerning_pair_count;
- data.kernings = &_hidpi_font_kerning_pairs[0][0];
- data.w = _hidpi_font_img_width;
- data.h = _hidpi_font_img_height;
- data.img = _hidpi_font_img_data;
-
- Ref<FontData> font_data;
- font_data.instance();
- font_data->load_memory((const uint8_t *)&data, sizeof(data), "fnt");
- default_font_size = font_data->get_base_size();
-
+ Ref<FontData> font_data = make_font(_hidpi_font_height, _hidpi_font_ascent, _hidpi_font_charcount, &_hidpi_font_charrects[0][0], _hidpi_font_kerning_pair_count, &_hidpi_font_kerning_pairs[0][0], _hidpi_font_img_width, _hidpi_font_img_height, _hidpi_font_img_data);
default_font.instance();
default_font->add_data(font_data);
} else {
- TextServer::BitmapFontData data;
- data.height = _lodpi_font_height;
- data.ascent = _lodpi_font_ascent;
- data.charcount = _lodpi_font_charcount;
- data.char_rects = &_lodpi_font_charrects[0][0];
- data.kerning_count = _lodpi_font_kerning_pair_count;
- data.kernings = &_lodpi_font_kerning_pairs[0][0];
- data.w = _lodpi_font_img_width;
- data.h = _lodpi_font_img_height;
- data.img = _lodpi_font_img_data;
-
- Ref<FontData> font_data;
- font_data.instance();
- font_data->load_memory((const uint8_t *)&data, sizeof(data), "fnt");
- default_font_size = font_data->get_base_size();
-
+ Ref<FontData> font_data = make_font(_lodpi_font_height, _lodpi_font_ascent, _lodpi_font_charcount, &_lodpi_font_charrects[0][0], _lodpi_font_kerning_pair_count, &_lodpi_font_kerning_pairs[0][0], _lodpi_font_img_width, _lodpi_font_img_height, _lodpi_font_img_data);
default_font.instance();
default_font->add_data(font_data);
}
diff --git a/scene/resources/default_theme/default_theme.h b/scene/resources/default_theme/default_theme.h
index 46f89a9b50..a7b2bec5a4 100644
--- a/scene/resources/default_theme/default_theme.h
+++ b/scene/resources/default_theme/default_theme.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/scene/resources/default_theme/icon_grid_minimap.png b/scene/resources/default_theme/icon_grid_minimap.png
new file mode 100644
index 0000000000..00a6179d5e
--- /dev/null
+++ b/scene/resources/default_theme/icon_grid_minimap.png
Binary files differ
diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h
index 7765348f80..b905c9db69 100644
--- a/scene/resources/default_theme/theme_data.h
+++ b/scene/resources/default_theme/theme_data.h
@@ -166,6 +166,10 @@ static const unsigned char icon_folder_png[] = {
0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x2e, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x6, 0x78, 0x70, 0xf4, 0xc1, 0x7f, 0x24, 0x78, 0x18, 0x53, 0xc1, 0x7f, 0x54, 0x48, 0x50, 0xc1, 0x43, 0x1b, 0xbc, 0xa, 0x50, 0xad, 0x23, 0xa4, 0xe0, 0xff, 0x70, 0x52, 0x70, 0x18, 0x97, 0xf4, 0xfd, 0x43, 0xd4, 0x88, 0x4a, 0x0, 0x5a, 0xcb, 0x18, 0xab, 0x5e, 0xd9, 0x1a, 0x53, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
+static const unsigned char icon_grid_minimap_png[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xe, 0xc3, 0x0, 0x0, 0xe, 0xc3, 0x1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f, 0xdf, 0xf7, 0xd7, 0x8d, 0x31, 0xed, 0x5e, 0xe2, 0x1f, 0xb, 0x5c, 0xe2, 0xcb, 0xd, 0x9b, 0x69, 0xcb, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
static const unsigned char icon_parent_folder_png[] = {
0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x68, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0xa0, 0x33, 0xb8, 0x27, 0xfe, 0xe0, 0xfc, 0x83, 0x73, 0xf7, 0xc4, 0x71, 0x48, 0xdf, 0x11, 0x7b, 0x78, 0xe9, 0xc1, 0x3f, 0x20, 0xbc, 0xfe, 0x40, 0x12, 0x8f, 0x34, 0x4c, 0x9, 0xa6, 0xe1, 0x57, 0x80, 0x12, 0x17, 0x81, 0xf8, 0x2f, 0x58, 0xe1, 0x15, 0x34, 0x8b, 0x1e, 0x9c, 0x5, 0xa, 0x5e, 0xb8, 0x23, 0x6, 0x52, 0x70, 0x5b, 0x14, 0xac, 0xf0, 0xc, 0xaa, 0x82, 0x7d, 0xf, 0x8e, 0xde, 0x14, 0xf9, 0xcf, 0x8, 0x52, 0xc0, 0xc0, 0x70, 0x5b, 0xf4, 0xe1, 0xc9, 0x7, 0x47, 0xb1, 0xb8, 0x3, 0xaa, 0x0, 0xa, 0x48, 0x52, 0x80, 0xb0, 0xea, 0xc8, 0xc3, 0x83, 0xc, 0x83, 0xe, 0x0, 0x0, 0xb8, 0x27, 0x55, 0x4c, 0xbe, 0xc0, 0xd2, 0xac, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
diff --git a/scene/resources/default_theme/xpmfix.sh b/scene/resources/default_theme/xpmfix.sh
deleted file mode 100755
index a24dede3c9..0000000000
--- a/scene/resources/default_theme/xpmfix.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-sed -i 's/static char/static const char/g' *.xpm