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

Fix popup windows content margins #92647

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion editor/themes/editor_theme_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ EditorThemeManager::ThemeConfiguration EditorThemeManager::_create_theme_config(
config.base_margin = config.base_spacing;
config.increased_margin = config.base_spacing + config.extra_spacing;
config.separation_margin = (config.base_spacing + config.extra_spacing / 2) * EDSCALE;
config.popup_margin = config.base_margin * 3 * EDSCALE;
config.popup_margin = config.base_margin * 2.4 * EDSCALE;
// Make sure content doesn't stick to window decorations; this can be fixed in future with layout changes.
config.window_border_margin = MAX(1, config.base_margin * 2);
config.top_bar_separation = config.base_margin * 2 * EDSCALE;
Expand Down Expand Up @@ -633,6 +633,7 @@ void EditorThemeManager::_create_shared_styles(const Ref<EditorTheme> &p_theme,
p_config.dialog_style = p_config.base_style->duplicate();
p_config.dialog_style->set_corner_radius(CORNER_TOP_LEFT, 0);
p_config.dialog_style->set_corner_radius(CORNER_TOP_RIGHT, 0);
p_config.dialog_style->set_content_margin_all(p_config.popup_margin);
// Prevent visible line between window title and body.
p_config.dialog_style->set_expand_margin(SIDE_BOTTOM, 2 * EDSCALE);
}
Expand Down
Loading