From 1eb4017e28f20a43e1e8fab76bd2550560e90fd6 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 29 Sep 2020 23:22:21 +0200 Subject: [PATCH] Make the pressed autokey icon red to emphasize its "recording" status (cherry picked from commit 95773bb3c1c627f022de7980084088c3414f6459) --- editor/plugins/canvas_item_editor_plugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 60c06f92994..0391cf8d0e5 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3898,6 +3898,12 @@ void CanvasItemEditor::_notification(int p_what) { key_scale_button->set_icon(get_icon("KeyScale", "EditorIcons")); key_insert_button->set_icon(get_icon("Key", "EditorIcons")); key_auto_insert_button->set_icon(get_icon("AutoKey", "EditorIcons")); + // Use a different color for the active autokey icon to make them easier + // to distinguish from the other key icons at the top. On a light theme, + // the icon will be dark, so we need to lighten it before blending it + // with the red color. + const Color key_auto_color = EditorSettings::get_singleton()->is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25); + key_auto_insert_button->add_color_override("icon_color_pressed", key_auto_color.linear_interpolate(Color(1, 0, 0), 0.55)); animation_menu->set_icon(get_icon("GuiTabMenuHl", "EditorIcons")); zoom_minus->set_icon(get_icon("ZoomLess", "EditorIcons"));