Merge pull request #92647 from passivestar/popup-margins
Fix popup windows content margins
This commit is contained in:
commit
5c30858ee1
@ -393,7 +393,7 @@ EditorThemeManager::ThemeConfiguration EditorThemeManager::_create_theme_config(
|
|||||||
config.base_margin = config.base_spacing;
|
config.base_margin = config.base_spacing;
|
||||||
config.increased_margin = config.base_spacing + config.extra_spacing;
|
config.increased_margin = config.base_spacing + config.extra_spacing;
|
||||||
config.separation_margin = (config.base_spacing + config.extra_spacing / 2) * EDSCALE;
|
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.
|
// 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.window_border_margin = MAX(1, config.base_margin * 2);
|
||||||
config.top_bar_separation = config.base_margin * 2 * EDSCALE;
|
config.top_bar_separation = config.base_margin * 2 * EDSCALE;
|
||||||
@ -642,6 +642,7 @@ void EditorThemeManager::_create_shared_styles(const Ref<EditorTheme> &p_theme,
|
|||||||
p_config.dialog_style = p_config.base_style->duplicate();
|
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_LEFT, 0);
|
||||||
p_config.dialog_style->set_corner_radius(CORNER_TOP_RIGHT, 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.
|
// Prevent visible line between window title and body.
|
||||||
p_config.dialog_style->set_expand_margin(SIDE_BOTTOM, 2 * EDSCALE);
|
p_config.dialog_style->set_expand_margin(SIDE_BOTTOM, 2 * EDSCALE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user