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:
Yuri Sizov 2023-01-19 19:14:09 +03:00
parent 14fdd28de9
commit 752402cf35
21 changed files with 285 additions and 300 deletions

View file

@ -53,7 +53,7 @@ BitMapEditor::BitMapEditor() {
// Reduce extra padding on top and bottom of size label.
Ref<StyleBoxEmpty> stylebox;
stylebox.instantiate();
stylebox->set_default_margin(SIDE_RIGHT, 4 * EDSCALE);
stylebox->set_content_margin(SIDE_RIGHT, 4 * EDSCALE);
size_label->add_theme_style_override("normal", stylebox);
}