From 7ee5cd26ef84eee43f489befdafb0288334efa1e Mon Sep 17 00:00:00 2001 From: VolTer Date: Fri, 12 May 2023 01:55:52 +0200 Subject: [PATCH] Remove AudioBusEmpty.svg, use ProgressBar tint instead --- editor/editor_audio_buses.cpp | 12 ++++++++---- editor/icons/{BusVuFull.svg => BusVuActive.svg} | 0 editor/icons/BusVuEmpty.svg | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) rename editor/icons/{BusVuFull.svg => BusVuActive.svg} (100%) delete mode 100644 editor/icons/BusVuEmpty.svg diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 9ed8cf7c213..93788dc8b13 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -69,11 +69,15 @@ void EditorAudioBus::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { + Ref active_bus_texture = get_theme_icon(SNAME("BusVuActive"), SNAME("EditorIcons")); for (int i = 0; i < CHANNELS_MAX; i++) { - channel[i].vu_l->set_under_texture(get_theme_icon(SNAME("BusVuEmpty"), SNAME("EditorIcons"))); - channel[i].vu_l->set_progress_texture(get_theme_icon(SNAME("BusVuFull"), SNAME("EditorIcons"))); - channel[i].vu_r->set_under_texture(get_theme_icon(SNAME("BusVuEmpty"), SNAME("EditorIcons"))); - channel[i].vu_r->set_progress_texture(get_theme_icon(SNAME("BusVuFull"), SNAME("EditorIcons"))); + channel[i].vu_l->set_under_texture(active_bus_texture); + channel[i].vu_l->set_tint_under(Color(0.75, 0.75, 0.75)); + channel[i].vu_l->set_progress_texture(active_bus_texture); + + channel[i].vu_r->set_under_texture(active_bus_texture); + channel[i].vu_r->set_tint_under(Color(0.75, 0.75, 0.75)); + channel[i].vu_r->set_progress_texture(active_bus_texture); channel[i].prev_active = true; } diff --git a/editor/icons/BusVuFull.svg b/editor/icons/BusVuActive.svg similarity index 100% rename from editor/icons/BusVuFull.svg rename to editor/icons/BusVuActive.svg diff --git a/editor/icons/BusVuEmpty.svg b/editor/icons/BusVuEmpty.svg deleted file mode 100644 index 88a14bc3eea..00000000000 --- a/editor/icons/BusVuEmpty.svg +++ /dev/null @@ -1 +0,0 @@ -