Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing style overrides for viewport overlay buttons #93361

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

passivestar
Copy link
Contributor

Viewport overlay buttons were missing styles which made them look broken in "hover-pressed" state and in RTL when using a custom theme

Before After
before_view after_view
before_rtl after_rtl

Note: this doesn't expose those overrides to theming and just using the same overlay stylebox for all states (just like the already existing overrides), because for now I want to avoid adding 11 styleboxes to EditorStyles. We can get back to this later when the situation with theme categories is figured out

@passivestar passivestar requested review from a team as code owners June 19, 2024 17:22
surface->add_child(cinema_label);
cinema_label->set_text(TTR("Cinematic Preview"));
cinema_label->hide();
previewing_cinema = false;

locked_label = memnew(Label);
locked_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
locked_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before After
vab vaa

Comment on lines -1785 to -1789
// 2D/CanvasItem editor
Ref<StyleBoxFlat> style_canvas_editor_info = make_flat_stylebox(Color(0.0, 0.0, 0.0, 0.2));
style_canvas_editor_info->set_expand_margin_all(4 * EDSCALE);
p_theme->set_stylebox("CanvasItemInfoOverlay", EditorStringName(EditorStyles), style_canvas_editor_info);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jun 21, 2024
@akien-mga akien-mga merged commit 4a9dc72 into godotengine:master Jun 21, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@passivestar passivestar deleted the viewport-buttons-styles branch June 21, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants