Skip to content

Commit

Permalink
Merge pull request #42417 from Calinou/autokey-pressed-red-icon
Browse files Browse the repository at this point in the history
Make the pressed autokey icon red to emphasize its "recording" status
  • Loading branch information
akien-mga authored Sep 29, 2020
2 parents 475f4fa + 95773bb commit 72a3759
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 72a3759

Please sign in to comment.