Clean-up, harmonize, and improve StyleBox API
- Make all margin properties follow the same naming convention (their getter and setter too). - Remove a virtual counterpart of `get_style_margin` from API. - Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
This commit is contained in:
@ -195,8 +195,8 @@ void EditorHelp::_class_desc_resized(bool p_force_update_theme) {
|
||||
display_margin = new_display_margin;
|
||||
|
||||
Ref<StyleBox> class_desc_stylebox = EditorNode::get_singleton()->get_theme_base()->get_theme_stylebox(SNAME("background"), SNAME("EditorHelp"))->duplicate();
|
||||
class_desc_stylebox->set_default_margin(SIDE_LEFT, display_margin);
|
||||
class_desc_stylebox->set_default_margin(SIDE_RIGHT, display_margin);
|
||||
class_desc_stylebox->set_content_margin(SIDE_LEFT, display_margin);
|
||||
class_desc_stylebox->set_content_margin(SIDE_RIGHT, display_margin);
|
||||
class_desc->add_theme_style_override("normal", class_desc_stylebox);
|
||||
class_desc->add_theme_style_override("focused", class_desc_stylebox);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user