Leave only one track type, WIP: track deletion.

This commit is contained in:
2025-07-27 23:52:25 +02:00
parent 90e85f5404
commit ecadfb7033
15 changed files with 190 additions and 218 deletions

View File

@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=236 format=3 uid="uid://b8rk41gjual2b"]
[gd_resource type="Theme" load_steps=238 format=3 uid="uid://b8rk41gjual2b"]
[ext_resource type="FontFile" uid="uid://501bous51s3p" path="res://Assets/Fonts/Inter-Regular.ttf" id="1_a74l0"]
[ext_resource type="Texture2D" uid="uid://blqywcg2e22in" path="res://Assets/Icons/checked.svg" id="2_jlkvh"]
@@ -2489,6 +2489,28 @@ corner_detail = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jkmfx"]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.19, 0.19, 0.19, 1)
border_width_bottom = 1
border_color = Color(0.223529, 0.223529, 0.223529, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c8ejd"]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.14902, 0.14902, 0.14902, 1)
border_width_bottom = 1
border_color = Color(0.223529, 0.223529, 0.223529, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jmej4"]
content_margin_left = 32.0
content_margin_top = 32.0
content_margin_right = 32.0
content_margin_bottom = 32.0
bg_color = Color(0.14902, 0.14902, 0.14902, 1)
border_width_bottom = 1
border_color = Color(0.223529, 0.223529, 0.223529, 1)
@@ -4479,8 +4501,10 @@ TooltipLabel/colors/font_shadow_color = Color(0, 0, 0, 0)
TooltipPanel/styles/panel = SubResource("StyleBoxFlat_qr21i")
TopBarOptionButton/font_sizes/font_size = 14
TopBarOptionButton/fonts/font = ExtResource("1_a74l0")
Track/base_type = &"PanelContainer"
Track/styles/panel = SubResource("StyleBoxFlat_jkmfx")
Track/base_type = &"Button"
Track/styles/focus = SubResource("StyleBoxFlat_jkmfx")
Track/styles/hover = SubResource("StyleBoxFlat_c8ejd")
Track/styles/normal = SubResource("StyleBoxFlat_jmej4")
Transport/base_type = &"PanelContainer"
Transport/styles/panel = SubResource("StyleBoxFlat_hry0s")
Tree/colors/children_hl_line_color = Color(1, 1, 1, 0.0196078)

View File

@@ -7,7 +7,7 @@
modulate = Color(0.552956, 0.552956, 0.552956, 1)
self_modulate = Color(1, 1, 1, 0.588235)
clip_contents = true
custom_minimum_size = Vector2(4, 64)
custom_minimum_size = Vector2(4, 32)
anchors_preset = -1
anchor_right = 0.104
anchor_bottom = 0.059

View File

@@ -1,57 +0,0 @@
[gd_scene load_steps=7 format=3 uid="uid://dlb5xpe1t8rrk"]
[ext_resource type="PackedScene" uid="uid://c3kajrpp2ux7" path="res://Controls/Track.tscn" id="1_envsv"]
[ext_resource type="Texture2D" uid="uid://doq1jqfntrjrc" path="res://Assets/Icons/audio_track_2.svg" id="2_g74u4"]
[ext_resource type="Texture2D" uid="uid://cc0dy71y8shcx" path="res://Assets/Icons/record.svg" id="2_iwhga"]
[ext_resource type="Texture2D" uid="uid://c8napjmkltpr" path="res://Assets/Icons/slider_grabber.svg" id="3_y81l0"]
[sub_resource type="StyleBoxLine" id="StyleBoxLine_ixeae"]
color = Color(0.1, 0.1, 0.1, 1)
thickness = 8
[sub_resource type="StyleBoxLine" id="StyleBoxLine_vrgqc"]
color = Color(0.5, 0.5, 0.5, 1)
thickness = 8
[node name="Track" instance=ExtResource("1_envsv")]
[node name="HBoxContainer" parent="PanelContainer/HBoxContainer/Body" index="0"]
theme_override_constants/separation = 8
[node name="MuteSolo" type="VBoxContainer" parent="PanelContainer/HBoxContainer/Body/HBoxContainer" index="0"]
layout_mode = 2
theme_override_constants/separation = 4
alignment = 1
[node name="Mute" type="Button" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/MuteSolo" index="0"]
modulate = Color(1, 0, 0, 1)
layout_mode = 2
toggle_mode = true
text = "M"
[node name="Solo" type="Button" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/MuteSolo" index="1"]
modulate = Color(1, 1, 0, 1)
layout_mode = 2
toggle_mode = true
text = "S"
[node name="TrackIcon" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName" index="0"]
texture = ExtResource("2_g74u4")
[node name="Record" type="Button" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName" index="2"]
self_modulate = Color(1, 0.373852, 0.504338, 1)
layout_mode = 2
size_flags_horizontal = 8
toggle_mode = true
icon = ExtResource("2_iwhga")
icon_alignment = 1
[node name="VolumeSlider" type="HSlider" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls" index="1"]
layout_mode = 2
theme_override_icons/grabber = ExtResource("3_y81l0")
theme_override_icons/grabber_highlight = ExtResource("3_y81l0")
theme_override_styles/slider = SubResource("StyleBoxLine_ixeae")
theme_override_styles/grabber_area = SubResource("StyleBoxLine_vrgqc")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxLine_vrgqc")
min_value = -80.0
max_value = 0.0

View File

@@ -1,106 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://y1aeb1b7cgh3"]
[ext_resource type="Theme" uid="uid://b8rk41gjual2b" path="res://Assets/DefaultTheme.tres" id="1_7wbal"]
[ext_resource type="Texture2D" uid="uid://bwfbs4jxbia3o" path="res://Assets/Icons/microphone_track.svg" id="2_ek3ni"]
[ext_resource type="Texture2D" uid="uid://cc0dy71y8shcx" path="res://Assets/Icons/record.svg" id="3_2mwx3"]
[node name="Track" type="Control"]
clip_children = 1
custom_minimum_size = Vector2(128, 74)
layout_mode = 3
anchors_preset = 0
offset_right = 382.0
offset_bottom = 74.0
theme = ExtResource("1_7wbal")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"]
clip_children = 1
layout_mode = 2
[node name="Panel" type="Panel" parent="PanelContainer/HBoxContainer"]
visible = false
custom_minimum_size = Vector2(4, 0)
layout_mode = 2
[node name="ColorRect" type="ColorRect" parent="PanelContainer/HBoxContainer"]
self_modulate = Color(0.699653, 0.699654, 0.699653, 1)
clip_contents = true
custom_minimum_size = Vector2(4, 0)
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 4
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/HBoxContainer/MarginContainer"]
layout_mode = 2
[node name="MuteSolo" type="VBoxContainer" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 4
alignment = 1
[node name="Mute" type="Button" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/MuteSolo"]
modulate = Color(1, 0, 0, 1)
layout_mode = 2
toggle_mode = true
text = "M"
[node name="Solo" type="Button" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/MuteSolo"]
modulate = Color(1, 1, 0, 1)
layout_mode = 2
toggle_mode = true
text = "S"
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer"]
clip_children = 1
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 4
alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
[node name="TrackIcon" type="TextureRect" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
modulate = Color(0.43134, 0.43134, 0.43134, 1)
custom_minimum_size = Vector2(16, 16)
layout_mode = 2
size_flags_horizontal = 0
texture = ExtResource("2_ek3ni")
expand_mode = 2
[node name="TrackName" type="LineEdit" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Track Name"
expand_to_text_length = true
context_menu_enabled = false
caret_blink = true
[node name="Record" type="Button" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
self_modulate = Color(1, 0.373852, 0.504338, 1)
layout_mode = 2
size_flags_horizontal = 8
toggle_mode = true
icon = ExtResource("3_2mwx3")
icon_alignment = 1
[node name="VolumeSlider" type="HSlider" parent="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
min_value = -80.0
max_value = 0.0
[connection signal="text_submitted" from="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/TrackName" to="PanelContainer/HBoxContainer/MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer/TrackName" method="release_focus" unbinds=1]

View File

@@ -1,9 +1,5 @@
[gd_scene load_steps=3 format=3 uid="uid://bhe0fbxuxrgjk"]
[gd_scene load_steps=2 format=3 uid="uid://bir03dfqbxgmh"]
[ext_resource type="PackedScene" uid="uid://c3kajrpp2ux7" path="res://Controls/Track.tscn" id="1_oloar"]
[ext_resource type="Texture2D" uid="uid://c1m8c0h70mpa5" path="res://Assets/Icons/label_track.svg" id="2_v5n7i"]
[node name="LabelTrack" instance=ExtResource("1_oloar")]
[node name="TrackIcon" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName" index="0"]
texture = ExtResource("2_v5n7i")

View File

@@ -1,9 +1,9 @@
[gd_scene load_steps=6 format=3 uid="uid://c3kajrpp2ux7"]
[ext_resource type="Theme" uid="uid://b8rk41gjual2b" path="res://Assets/DefaultTheme.tres" id="1_tbi88"]
[ext_resource type="Texture2D" uid="uid://bwfbs4jxbia3o" path="res://Assets/Icons/microphone_track.svg" id="2_r2pin"]
[ext_resource type="Script" uid="uid://nq2n8r8tq3nt" path="res://Scripts/Track.gd" id="2_rsf0h"]
[ext_resource type="FontFile" uid="uid://ctw3g5gundhpj" path="res://Assets/Fonts/InterVariable.ttf" id="3_12y3l"]
[ext_resource type="Script" uid="uid://dxqa86sq21uac" path="res://Scripts/TrackLineEdit.gd" id="4_2nwak"]
[sub_resource type="FontVariation" id="FontVariation_lbdn3"]
base_font = ExtResource("3_12y3l")
@@ -12,73 +12,86 @@ variation_opentype = {
2003265652: 500
}
[node name="Track" type="Control"]
clip_children = 1
custom_minimum_size = Vector2(128, 64)
layout_mode = 3
anchors_preset = 0
offset_right = 382.0
offset_bottom = 64.0
theme = ExtResource("1_tbi88")
[node name="Track" type="Button"]
clip_children = 2
custom_minimum_size = Vector2(0, 40)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -1466.0
offset_bottom = -1040.0
grow_horizontal = 2
grow_vertical = 2
theme_type_variation = &"Track"
script = ExtResource("2_rsf0h")
[node name="PanelContainer" type="PanelContainer" parent="."]
[node name="HBoxContainer" type="HBoxContainer" parent="."]
clip_children = 1
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_type_variation = &"Track"
mouse_filter = 2
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"]
clip_children = 1
layout_mode = 2
[node name="ColorStrip" type="ColorRect" parent="PanelContainer/HBoxContainer"]
[node name="ColorStrip" type="ColorRect" parent="HBoxContainer"]
self_modulate = Color(0.699653, 0.699654, 0.699653, 1)
clip_contents = true
custom_minimum_size = Vector2(2, 0)
layout_mode = 2
mouse_filter = 2
color = Color(0.435294, 0.435294, 0.435294, 1)
[node name="Body" type="MarginContainer" parent="PanelContainer/HBoxContainer"]
[node name="Body" type="MarginContainer" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
theme_override_constants/margin_left = 4
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/HBoxContainer/Body"]
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/Body"]
layout_mode = 2
mouse_filter = 2
[node name="NameIconControls" type="VBoxContainer" parent="PanelContainer/HBoxContainer/Body/HBoxContainer"]
[node name="NameIconControls" type="VBoxContainer" parent="HBoxContainer/Body/HBoxContainer"]
clip_children = 1
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
theme_override_constants/separation = 4
alignment = 1
[node name="IconAndName" type="HBoxContainer" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls"]
[node name="IconAndName" type="HBoxContainer" parent="HBoxContainer/Body/HBoxContainer/NameIconControls"]
custom_minimum_size = Vector2(0, 32)
layout_mode = 2
mouse_filter = 2
[node name="TrackIcon" type="TextureRect" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName"]
[node name="TrackIcon" type="TextureRect" parent="HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName"]
visible = false
modulate = Color(0.43134, 0.43134, 0.43134, 1)
custom_minimum_size = Vector2(16, 16)
layout_mode = 2
size_flags_horizontal = 0
mouse_filter = 2
texture = ExtResource("2_r2pin")
expand_mode = 2
[node name="TrackName" type="LineEdit" parent="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName"]
[node name="TrackName" type="LineEdit" parent="HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName"]
unique_name_in_owner = true
custom_minimum_size = Vector2(256, 0)
layout_mode = 2
size_flags_horizontal = 3
size_flags_horizontal = 0
size_flags_vertical = 4
theme_override_fonts/font = SubResource("FontVariation_lbdn3")
text = "Track Name"
expand_to_text_length = true
placeholder_text = "Empty Track"
context_menu_enabled = false
flat = true
draw_control_chars = true
caret_blink = true
script = ExtResource("4_2nwak")
[connection signal="text_submitted" from="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName/TrackName" to="PanelContainer/HBoxContainer/Body/HBoxContainer/NameIconControls/IconAndName/TrackName" method="release_focus" unbinds=1]
[node name="PopupMenu" type="PopupMenu" parent="."]
unique_name_in_owner = true

View File

@@ -40,8 +40,19 @@ func format_time_ms_minutes(ms: float) -> String:
func _ready():
await get_tree().process_frame
queue_redraw()
for c in track_list.get_children():
if c is Track:
var track = c as Track
track.on_deleted.connect(_track_deleted)
pass
pass
func _track_deleted(idx: int):
print("track deleted")
await get_tree().process_frame
queue_redraw()
pass
func get_track_idx_by_y(y: float):
var idx = 0
@@ -97,7 +108,7 @@ func _draw():
draw_line(Vector2(x, 28.0), Vector2(x, timeline_y), secondary_color, line_thickness)
pass
# track lines
# track horizontal lines
for t in track_list.get_children():
draw_line(Vector2(0.0, t.global_position.y - global_position.y + t.size.y), Vector2(size.x, t.global_position.y - global_position.y + t.size.y), secondary_color, line_thickness)
pass

View File

@@ -1,7 +1,45 @@
class_name Track
extends Control
extends Button
signal on_deleted
signal on_renamed
signal on_duplicated
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
var menu: PopupMenu = $PopupMenu
menu.add_item("Rename", 0)
menu.add_item("Delete", 1)
menu.add_item("Duplicate", 2)
menu.id_pressed.connect(_on_menu_option)
func _on_menu_option(id: int):
match id:
0:
rename()
1:
delete()
2:
duplicate_track()
pass
func delete():
queue_free()
var idx = get_index()
print(idx)
on_deleted.emit(idx)
pass
func rename():
%TrackName.grab_focus()
pass
func duplicate_track():
pass
func _gui_input(event):
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_RIGHT and event.pressed:
var popup = %PopupMenu
#%PopupMenu.popup(get_global_mouse_position())
var pos = get_global_mouse_position()
var rect = Rect2i(pos, popup.get_contents_minimum_size())
popup.popup(rect)

9
Scripts/TrackLineEdit.gd Normal file
View File

@@ -0,0 +1,9 @@
extends LineEdit
func _ready() -> void:
text_submitted.connect(submit)
func submit(text: String):
caret_column = 0
release_focus()
pass

View File

@@ -0,0 +1 @@
uid://dxqa86sq21uac

View File

@@ -7,12 +7,18 @@ namespace AudioEditor;
public partial class ProjectController : Node
{
[Signal] public delegate void AudioClipDroppedEventHandler(Vector2 atPosition, string path, string clipName, double startTime, double endTime);
[Signal] public delegate void OnTrackDeletedEventHandler(int trackIdx);
public override void _Ready()
{
GetWindow().FilesDropped += FilesDropped;
}
public void DeleteTrack(int trackIdx)
{
}
public void CreateAudioClipPreview(Control audioClip)
{
// GD.Print(audioClip.Clas());

View File

@@ -152,6 +152,7 @@ layout = SubResource("Resource_20kxa")
[node name="Tracks" parent="VBoxContainer/VSplitContainer/HSplitContainer/LeftDock" instance=ExtResource("5_rgxdu")]
layout_mode = 2
mouse_filter = 2
[node name="Timeline" parent="VBoxContainer/VSplitContainer/HSplitContainer" node_paths=PackedStringArray("track_list") instance=ExtResource("7_xu70y")]
layout_mode = 2

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://bpd6g2b3s7tqa"]
[ext_resource type="PackedScene" uid="uid://dlb5xpe1t8rrk" path="res://Controls/AudioTrack.tscn" id="1_ueogm"]
[ext_resource type="PackedScene" uid="uid://c3kajrpp2ux7" path="res://Controls/Track.tscn" id="1_qr47w"]
[ext_resource type="Texture2D" uid="uid://b3mydiolrvqlr" path="res://Assets/Icons/add.svg" id="2_rekuu"]
[node name="Tracks" type="Control"]
@@ -19,31 +19,22 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="TrackList" type="VBoxContainer" parent="VBoxContainer"]
custom_minimum_size = Vector2(128, 0)
layout_mode = 2
size_flags_vertical = 3
mouse_filter = 2
[node name="Track" parent="VBoxContainer/TrackList" instance=ExtResource("1_ueogm")]
custom_minimum_size = Vector2(128, 74)
[node name="Track" parent="VBoxContainer/TrackList" instance=ExtResource("1_qr47w")]
layout_mode = 2
script = null
[node name="Track2" parent="VBoxContainer/TrackList" instance=ExtResource("1_ueogm")]
custom_minimum_size = Vector2(128, 74)
[node name="Track2" parent="VBoxContainer/TrackList" instance=ExtResource("1_qr47w")]
layout_mode = 2
script = null
[node name="Track3" parent="VBoxContainer/TrackList" instance=ExtResource("1_ueogm")]
custom_minimum_size = Vector2(128, 74)
[node name="Track3" parent="VBoxContainer/TrackList" instance=ExtResource("1_qr47w")]
layout_mode = 2
script = null
[node name="Track4" parent="VBoxContainer/TrackList" instance=ExtResource("1_ueogm")]
custom_minimum_size = Vector2(128, 74)
layout_mode = 2
script = null
[node name="AddTrack" type="MenuButton" parent="VBoxContainer"]
layout_mode = 2

44
export_presets.cfg Normal file
View File

@@ -0,0 +1,44 @@
[preset.0]
name="Linux"
platform="Linux"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Audio Editor Builds/AudioEditor.x86_64"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false

View File

@@ -14,6 +14,7 @@ config/name="AudioEditor"
run/main_scene="res://Views/MainView.tscn"
config/features=PackedStringArray("4.4", "C#", "GL Compatibility")
run/low_processor_mode=true
run/delta_smoothing=false
boot_splash/show_image=false
config/icon="res://icon.svg"