You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Allow theming audio buses
This commit is contained in:
@@ -140,11 +140,11 @@ void EditorAudioBus::_notification(int p_what) {
|
||||
|
||||
case NOTIFICATION_DRAW: {
|
||||
if (is_master) {
|
||||
draw_style_box(get_theme_stylebox(SNAME("disabled"), SNAME("Button")), Rect2(Vector2(), get_size()));
|
||||
draw_style_box(get_theme_stylebox(SNAME("master"), SNAME("EditorAudioBus")), Rect2(Vector2(), get_size()));
|
||||
} else if (has_focus()) {
|
||||
draw_style_box(get_theme_stylebox(SNAME("focus"), SNAME("Button")), Rect2(Vector2(), get_size()));
|
||||
draw_style_box(get_theme_stylebox(SNAME("focus"), SNAME("EditorAudioBus")), Rect2(Vector2(), get_size()));
|
||||
} else {
|
||||
draw_style_box(get_theme_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles)), Rect2(Vector2(), get_size()));
|
||||
draw_style_box(get_theme_stylebox(SNAME("normal"), SNAME("EditorAudioBus")), Rect2(Vector2(), get_size()));
|
||||
}
|
||||
|
||||
if (get_index() != 0 && hovering_drop) {
|
||||
|
||||
@@ -1972,6 +1972,11 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
||||
icon_hover_color.a = 1.0;
|
||||
p_theme->set_color("icon_hover_color", "BottomPanelButton", icon_hover_color);
|
||||
p_theme->set_color("icon_hover_pressed_color", "BottomPanelButton", icon_hover_color);
|
||||
|
||||
// Audio bus.
|
||||
p_theme->set_stylebox("normal", "EditorAudioBus", style_bottom_panel);
|
||||
p_theme->set_stylebox("master", "EditorAudioBus", p_config.button_style_disabled);
|
||||
p_theme->set_stylebox("focus", "EditorAudioBus", p_config.button_style_focus);
|
||||
}
|
||||
|
||||
// Editor GUI widgets.
|
||||
|
||||
Reference in New Issue
Block a user