Skip to content

Commit

Permalink
Fix popup windows content margins
Browse files Browse the repository at this point in the history
  • Loading branch information
passivestar committed Jun 18, 2024
1 parent 705b7a0 commit 71b300d
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 71b300d

Please sign in to comment.