optimized default theme and updated optimization script

This commit is contained in:
RodZill4 2020-02-25 06:17:23 +01:00
parent f0b55ade8f
commit a0e5ad18b6
25 changed files with 389 additions and 525 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

View File

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sb_checkbox_focus_texture.png-1ae449981f064eeb7b0a2c38fd6881c7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://material_maker/theme/default/sb_checkbox_focus_texture.png"
dest_files=[ "res://.import/sb_checkbox_focus_texture.png-1ae449981f064eeb7b0a2c38fd6881c7.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

View File

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sb_checkbox_hover_pressed_texture.png-2bd3c36cb1c42f8c46341ef57f744f54.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://material_maker/theme/default/sb_checkbox_hover_pressed_texture.png"
dest_files=[ "res://.import/sb_checkbox_hover_pressed_texture.png-2bd3c36cb1c42f8c46341ef57f744f54.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 84 B

View File

@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/sb_button_focus_texture.png-d6b09ea3d93a61e19411f15f0d14433f.stex"
path="res://.import/sb_hsplitcontainer_bg_texture.png-4c932338ca2612701d214a7c590447c3.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://material_maker/theme/default/sb_button_focus_texture.png"
dest_files=[ "res://.import/sb_button_focus_texture.png-d6b09ea3d93a61e19411f15f0d14433f.stex" ]
source_file="res://material_maker/theme/default/sb_hsplitcontainer_bg_texture.png"
dest_files=[ "res://.import/sb_hsplitcontainer_bg_texture.png-4c932338ca2612701d214a7c590447c3.stex" ]
[params]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

View File

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sb_lineedit_focus_texture.png-7777250b8201ffe1184a21f33d6e34e0.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://material_maker/theme/default/sb_lineedit_focus_texture.png"
dest_files=[ "res://.import/sb_lineedit_focus_texture.png-7777250b8201ffe1184a21f33d6e34e0.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

View File

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sb_optionbutton_focus_texture.png-38bf70d625df8b4816521ff4f16f2392.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://material_maker/theme/default/sb_optionbutton_focus_texture.png"
dest_files=[ "res://.import/sb_optionbutton_focus_texture.png-38bf70d625df8b4816521ff4f16f2392.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 218 B

View File

@ -4,7 +4,7 @@ extends EditorScript
# This script grabs all textures from a theme and throws them into the icons
func _run():
for t in ["res://material_maker/theme/dark.tres", "res://material_maker/theme/default.tres", "res://material_maker/theme/light.tres"]:
for t in ["res://material_maker/theme/default.tres"]:
optimize_theme(t)
func optimize_theme(theme_path):
@ -29,8 +29,18 @@ func optimize_theme(theme_path):
if new_sb[t] != null:
var png_name = ("sb_"+stylebox_name+"_"+sb_name+"_"+t).to_lower()
var png_path : String = icon_dir+"/"+png_name+".png"
new_sb[t].get_data().save_png(png_path)
new_sb[t] = load(png_path)
var new_icon = load(png_path)
if new_icon == null:
print("missing icon "+png_path)
var image = new_sb[t].get_data()
if image != null:
print("saving icon "+png_path)
image.save_png(png_path)
new_icon = load(png_path)
if new_icon != null:
new_sb[t] = new_icon
else:
new_sb[t] = new_icon
else:
new_theme.set_stylebox(sb_name, stylebox_name, theme.get_stylebox(sb_name, stylebox_name))
for icon_name in theme.get_icon_list(stylebox_name):
@ -45,8 +55,9 @@ func optimize_theme(theme_path):
print("saving icon "+png_path)
image.save_png(png_path)
new_icon = load(png_path)
new_theme.set_icon(icon_name, stylebox_name, new_icon)
if new_icon != null:
new_theme.set_icon(icon_name, stylebox_name, new_icon)
else:
new_theme.set_icon(icon_name, stylebox_name, new_icon)
ResourceSaver.save(theme_path.replace(".tres", "_opt.tres"), new_theme)
ResourceSaver.save(theme_path, new_theme)
print("done")