mirror of
https://github.com/godotengine/godot
synced 2024-09-05 23:12:29 +00:00
Merge pull request #93223 from passivestar/movie-button-colors
Allow theming movie writer button icon color
This commit is contained in:
commit
d21812f49b
|
@ -66,9 +66,10 @@ void EditorRunBar::_notification(int p_what) {
|
||||||
write_movie_button->set_icon(get_editor_theme_icon(SNAME("MainMovieWrite")));
|
write_movie_button->set_icon(get_editor_theme_icon(SNAME("MainMovieWrite")));
|
||||||
// This button behaves differently, so color it as such.
|
// This button behaves differently, so color it as such.
|
||||||
write_movie_button->begin_bulk_theme_override();
|
write_movie_button->begin_bulk_theme_override();
|
||||||
write_movie_button->add_theme_color_override("icon_normal_color", Color(1, 1, 1, 0.7));
|
write_movie_button->add_theme_color_override("icon_normal_color", get_theme_color(SNAME("movie_writer_icon_normal"), EditorStringName(EditorStyles)));
|
||||||
write_movie_button->add_theme_color_override("icon_pressed_color", Color(0, 0, 0, 0.84));
|
write_movie_button->add_theme_color_override("icon_pressed_color", get_theme_color(SNAME("movie_writer_icon_pressed"), EditorStringName(EditorStyles)));
|
||||||
write_movie_button->add_theme_color_override("icon_hover_color", Color(1, 1, 1, 0.9));
|
write_movie_button->add_theme_color_override("icon_hover_color", get_theme_color(SNAME("movie_writer_icon_hover"), EditorStringName(EditorStyles)));
|
||||||
|
write_movie_button->add_theme_color_override("icon_hover_pressed_color", get_theme_color(SNAME("movie_writer_icon_hover_pressed"), EditorStringName(EditorStyles)));
|
||||||
write_movie_button->end_bulk_theme_override();
|
write_movie_button->end_bulk_theme_override();
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1859,7 +1859,7 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
||||||
editor_spin_label_bg->set_border_width_all(0);
|
editor_spin_label_bg->set_border_width_all(0);
|
||||||
p_theme->set_stylebox("label_bg", "EditorSpinSlider", editor_spin_label_bg);
|
p_theme->set_stylebox("label_bg", "EditorSpinSlider", editor_spin_label_bg);
|
||||||
|
|
||||||
// Launch Pad and Play buttons
|
// Launch Pad and Play buttons.
|
||||||
Ref<StyleBoxFlat> style_launch_pad = make_flat_stylebox(p_config.dark_color_1, 2 * EDSCALE, 0, 2 * EDSCALE, 0, p_config.corner_radius);
|
Ref<StyleBoxFlat> style_launch_pad = make_flat_stylebox(p_config.dark_color_1, 2 * EDSCALE, 0, 2 * EDSCALE, 0, p_config.corner_radius);
|
||||||
style_launch_pad->set_corner_radius_all(p_config.corner_radius * EDSCALE);
|
style_launch_pad->set_corner_radius_all(p_config.corner_radius * EDSCALE);
|
||||||
p_theme->set_stylebox("LaunchPadNormal", EditorStringName(EditorStyles), style_launch_pad);
|
p_theme->set_stylebox("LaunchPadNormal", EditorStringName(EditorStyles), style_launch_pad);
|
||||||
|
@ -1879,6 +1879,12 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
||||||
style_write_movie_button->set_content_margin(SIDE_RIGHT, 0);
|
style_write_movie_button->set_content_margin(SIDE_RIGHT, 0);
|
||||||
style_write_movie_button->set_expand_margin(SIDE_RIGHT, 2 * EDSCALE);
|
style_write_movie_button->set_expand_margin(SIDE_RIGHT, 2 * EDSCALE);
|
||||||
p_theme->set_stylebox("MovieWriterButtonPressed", EditorStringName(EditorStyles), style_write_movie_button);
|
p_theme->set_stylebox("MovieWriterButtonPressed", EditorStringName(EditorStyles), style_write_movie_button);
|
||||||
|
|
||||||
|
// Movie writer button colors.
|
||||||
|
p_theme->set_color("movie_writer_icon_normal", EditorStringName(EditorStyles), Color(1, 1, 1, 0.7));
|
||||||
|
p_theme->set_color("movie_writer_icon_pressed", EditorStringName(EditorStyles), Color(0, 0, 0, 0.84));
|
||||||
|
p_theme->set_color("movie_writer_icon_hover", EditorStringName(EditorStyles), Color(1, 1, 1, 0.9));
|
||||||
|
p_theme->set_color("movie_writer_icon_hover_pressed", EditorStringName(EditorStyles), Color(0, 0, 0, 0.84));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Standard GUI variations.
|
// Standard GUI variations.
|
||||||
|
|
Loading…
Reference in a new issue