diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-09-29 23:22:21 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-09-29 23:22:21 +0200 |
commit | 95773bb3c1c627f022de7980084088c3414f6459 (patch) | |
tree | d79eefe498816c934502691ae0ca80b06f65e219 /editor | |
parent | 475f4faead2f4ad397656e1bf334891cde550c09 (diff) |
Make the pressed autokey icon red to emphasize its "recording" status
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index ef4ba9819f..402ec5d80d 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -4023,6 +4023,12 @@ void CanvasItemEditor::_notification(int p_what) { key_scale_button->set_icon(get_theme_icon("KeyScale", "EditorIcons")); key_insert_button->set_icon(get_theme_icon("Key", "EditorIcons")); key_auto_insert_button->set_icon(get_theme_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_theme_color_override("icon_color_pressed", key_auto_color.lerp(Color(1, 0, 0), 0.55)); animation_menu->set_icon(get_theme_icon("GuiTabMenuHl", "EditorIcons")); zoom_minus->set_icon(get_theme_icon("ZoomLess", "EditorIcons")); |