summaryrefslogtreecommitdiffstats
path: root/editor/icons/editor_icons_builders.py
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-02-23 23:55:18 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2020-02-24 18:53:05 +0100
commit1f8c82df32a16470bde9d0153728b1fc051e15a2 (patch)
tree8b628d3f8e5e4c407ceeea25093cb29254f28f0e /editor/icons/editor_icons_builders.py
parent5e181ac9f1fb83df6a933865753e54b534ac1048 (diff)
downloadredot-engine-1f8c82df32a16470bde9d0153728b1fc051e15a2.tar.gz
Use PascalCase file names for editor icons
Using PascalCase file names without any conversion step is less confusing to new contributors.
Diffstat (limited to 'editor/icons/editor_icons_builders.py')
-rw-r--r--editor/icons/editor_icons_builders.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/icons/editor_icons_builders.py b/editor/icons/editor_icons_builders.py
index dfd0802ce9..ea2c2e57d1 100644
--- a/editor/icons/editor_icons_builders.py
+++ b/editor/icons/editor_icons_builders.py
@@ -27,7 +27,6 @@ def make_editor_icons_action(target, source, env):
icons_string.write("\\" + str(hex(ord(b)))[1:])
b = svgf.read(1)
-
icons_string.write('"')
if fname != svg_icons[-1]:
icons_string.write(",")
@@ -44,17 +43,16 @@ def make_editor_icons_action(target, source, env):
s.write("static const char *editor_icons_names[] = {\n")
# this is used to store the indices of thumbnail icons
- thumb_medium_indices = [];
- thumb_big_indices = [];
+ thumb_medium_indices = []
+ thumb_big_indices = []
index = 0
for f in svg_icons:
fname = str(f)
- icon_name = os.path.basename(fname)[5:-4].title().replace("_", "")
+ # Trim the `.svg` extension from the string.
+ icon_name = os.path.basename(fname)[:-4]
# some special cases
- if icon_name in ['Int', 'Bool', 'Float']:
- icon_name = icon_name.lower()
if icon_name.endswith("MediumThumb"): # don't know a better way to handle this
thumb_medium_indices.append(str(index))
if icon_name.endswith("BigThumb"): # don't know a better way to handle this