Move default theme files to scene/theme
This also puts the default theme icons into their own folder.
|
@ -154,11 +154,11 @@ doc_classes/* @godotengine/documentation
|
|||
/scene/debugger/ @godotengine/debugger
|
||||
/scene/gui/ @godotengine/gui-nodes
|
||||
/scene/main/ @godotengine/core
|
||||
/scene/resources/default_theme/ @godotengine/gui-nodes
|
||||
/scene/resources/font.* @godotengine/gui-nodes
|
||||
/scene/resources/text_line.* @godotengine/gui-nodes
|
||||
/scene/resources/text_paragraph.* @godotengine/gui-nodes
|
||||
/scene/resources/visual_shader*.* @godotengine/shaders
|
||||
/scene/theme/ @godotengine/gui-nodes
|
||||
|
||||
# Servers
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "core/io/dir_access.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/resources/default_theme/default_theme.h"
|
||||
#include "scene/resources/font.h"
|
||||
|
||||
Ref<FontFile> load_external_font(const String &p_path, TextServer::Hinting p_hinting, TextServer::FontAntialiasing p_aa, bool p_autohint, TextServer::SubpixelPositioning p_font_subpixel_positioning, bool p_msdf = false, TypedArray<Font> *r_fallbacks = nullptr) {
|
||||
|
|
|
@ -245,7 +245,7 @@ static Ref<StyleBoxLine> make_line_stylebox(Color p_color, int p_thickness = 1,
|
|||
return style;
|
||||
}
|
||||
|
||||
// See also `generate_icon()` in `scene/resources/default_theme.cpp`.
|
||||
// See also `generate_icon()` in `scene/theme/default_theme.cpp`.
|
||||
static Ref<ImageTexture> editor_generate_icon(int p_index, float p_scale, float p_saturation, const HashMap<Color, Color> &p_convert_colors = HashMap<Color, Color>()) {
|
||||
Ref<Image> img = memnew(Image);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ from io import StringIO
|
|||
from platform_methods import subprocess_main
|
||||
|
||||
|
||||
# See also `scene/resources/default_theme/default_theme_icons_builders.py`.
|
||||
# See also `scene/theme/icons/default_theme_icons_builders.py`.
|
||||
def make_editor_icons_action(target, source, env):
|
||||
dst = target[0]
|
||||
svg_icons = source
|
||||
|
|
|
@ -159,7 +159,6 @@
|
|||
#include "scene/resources/convex_polygon_shape_3d.h"
|
||||
#include "scene/resources/curve_texture.h"
|
||||
#include "scene/resources/cylinder_shape_3d.h"
|
||||
#include "scene/resources/default_theme/default_theme.h"
|
||||
#include "scene/resources/environment.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/gradient.h"
|
||||
|
|
|
@ -22,5 +22,3 @@ env.scene_sources += scene_obj
|
|||
|
||||
# Needed to force rebuilding the scene files when the thirdparty code is updated.
|
||||
env.Depends(scene_obj, thirdparty_obj)
|
||||
|
||||
SConscript("default_theme/SCsub")
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
Import("env")
|
||||
|
||||
from platform_methods import run_in_subprocess
|
||||
import default_theme_builders
|
||||
import default_theme_icons_builders
|
||||
|
||||
env.add_source_files(env.scene_sources, "*.cpp")
|
||||
|
||||
env.Depends("#scene/resources/default_theme/default_font.gen.h", "#thirdparty/fonts/OpenSans_SemiBold.woff2")
|
||||
env.CommandNoCache(
|
||||
"#scene/resources/default_theme/default_font.gen.h",
|
||||
"#thirdparty/fonts/OpenSans_SemiBold.woff2",
|
||||
run_in_subprocess(default_theme_builders.make_fonts_header),
|
||||
)
|
||||
|
||||
env["BUILDERS"]["MakeDefaultThemeIconsBuilder"] = Builder(
|
||||
action=env.Run(
|
||||
default_theme_icons_builders.make_default_theme_icons_action, "Generating default project theme icons header."
|
||||
),
|
||||
suffix=".h",
|
||||
src_suffix=".svg",
|
||||
)
|
||||
|
||||
# Default theme icons
|
||||
icon_sources = Glob("*.svg")
|
||||
|
||||
env.Alias(
|
||||
"default_theme_icons",
|
||||
[env.MakeDefaultThemeIconsBuilder("#scene/resources/default_theme/default_theme_icons.gen.h", icon_sources)],
|
||||
)
|
|
@ -2,4 +2,17 @@
|
|||
|
||||
Import("env")
|
||||
|
||||
from platform_methods import run_in_subprocess
|
||||
import default_theme_builders
|
||||
|
||||
|
||||
env.add_source_files(env.scene_sources, "*.cpp")
|
||||
|
||||
SConscript("icons/SCsub")
|
||||
|
||||
env.Depends("#scene/theme/default_font.gen.h", "#thirdparty/fonts/OpenSans_SemiBold.woff2")
|
||||
env.CommandNoCache(
|
||||
"#scene/theme/default_font.gen.h",
|
||||
"#thirdparty/fonts/OpenSans_SemiBold.woff2",
|
||||
run_in_subprocess(default_theme_builders.make_fonts_header),
|
||||
)
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
Import("env")
|
||||
|
||||
import default_theme_icons_builders
|
||||
|
||||
|
||||
env["BUILDERS"]["MakeDefaultThemeIconsBuilder"] = Builder(
|
||||
action=env.Run(
|
||||
default_theme_icons_builders.make_default_theme_icons_action, "Generating default project theme icons header."
|
||||
),
|
||||
suffix=".h",
|
||||
src_suffix=".svg",
|
||||
)
|
||||
|
||||
# Default theme icons
|
||||
icon_sources = Glob("*.svg")
|
||||
|
||||
env.Alias(
|
||||
"default_theme_icons",
|
||||
[env.MakeDefaultThemeIconsBuilder("#scene/theme/default_theme_icons.gen.h", icon_sources)],
|
||||
)
|
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 283 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 270 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 771 B |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 598 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 134 B After Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 278 B After Width: | Height: | Size: 278 B |
|
@ -32,11 +32,11 @@
|
|||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "scene/resources/default_theme/default_theme.h"
|
||||
#include "scene/resources/font.h"
|
||||
#include "scene/resources/style_box.h"
|
||||
#include "scene/resources/texture.h"
|
||||
#include "scene/resources/theme.h"
|
||||
#include "scene/theme/default_theme.h"
|
||||
#include "servers/text_server.h"
|
||||
|
||||
// Default engine theme creation and configuration.
|
||||
|
|