diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-08-30 21:18:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 21:18:41 +0200 |
commit | 292b94b97c074299d12e7f6aad9f446168d456a2 (patch) | |
tree | 1adab0277da565269e41c50f76807e4bf4b0dd96 /editor/editor_themes.cpp | |
parent | c24c67858a2317647470396e877f909097d0ad05 (diff) | |
parent | a462d6e402d1480bfd889e3d70e53cf15168a898 (diff) | |
download | redot-engine-292b94b97c074299d12e7f6aad9f446168d456a2.tar.gz |
Merge pull request #65089 from YuriSizov/editor-launch-bar-with-style
Improve style and add contextual highlight to the editor launch pad
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 088239c2d9..af0e40d1d4 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -741,8 +741,26 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("ScriptEditorPanel", "EditorStyles", make_empty_stylebox(default_margin_size, 0, default_margin_size, default_margin_size)); theme->set_stylebox("ScriptEditor", "EditorStyles", make_empty_stylebox(0, 0, 0, 0)); - // Play button group - theme->set_stylebox("PlayButtonPanel", "EditorStyles", style_empty); + // Launch Pad and Play buttons + Ref<StyleBoxFlat> style_launch_pad = make_flat_stylebox(dark_color_1, 2 * EDSCALE, 0, 2 * EDSCALE, 0, corner_width); + style_launch_pad->set_corner_radius_all(corner_radius * EDSCALE); + theme->set_stylebox("LaunchPadNormal", "EditorStyles", style_launch_pad); + Ref<StyleBoxFlat> style_launch_pad_movie = style_launch_pad->duplicate(); + style_launch_pad_movie->set_bg_color(accent_color * Color(1, 1, 1, 0.1)); + style_launch_pad_movie->set_border_color(accent_color); + style_launch_pad_movie->set_border_width_all(Math::round(2 * EDSCALE)); + theme->set_stylebox("LaunchPadMovieMode", "EditorStyles", style_launch_pad_movie); + + theme->set_stylebox("MovieWriterButtonNormal", "EditorStyles", make_empty_stylebox(0, 0, 0, 0)); + Ref<StyleBoxFlat> style_write_movie_button = style_widget_pressed->duplicate(); + style_write_movie_button->set_bg_color(accent_color); + style_write_movie_button->set_corner_radius_all(corner_radius * EDSCALE); + style_write_movie_button->set_default_margin(SIDE_TOP, 0); + style_write_movie_button->set_default_margin(SIDE_BOTTOM, 0); + style_write_movie_button->set_default_margin(SIDE_LEFT, 0); + style_write_movie_button->set_default_margin(SIDE_RIGHT, 0); + style_write_movie_button->set_expand_margin_size(SIDE_RIGHT, 2 * EDSCALE); + theme->set_stylebox("MovieWriterButtonPressed", "EditorStyles", style_write_movie_button); theme->set_stylebox("normal", "MenuButton", style_menu); theme->set_stylebox("hover", "MenuButton", style_widget_hover); |