mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Add a margin to "checkable" property checkboxes in the editor inspector
This makes "checkable" property checkboxes look more consistent with other checkboxes.
This commit is contained in:
parent
197b65f32a
commit
ecda25b050
1 changed files with 2 additions and 3 deletions
|
|
@ -66,7 +66,7 @@ Size2 EditorProperty::get_minimum_size() const {
|
||||||
|
|
||||||
if (checkable) {
|
if (checkable) {
|
||||||
Ref<Texture> check = get_icon("checked", "CheckBox");
|
Ref<Texture> check = get_icon("checked", "CheckBox");
|
||||||
ms.width += check->get_width() + get_constant("hseparator", "Tree");
|
ms.width += check->get_width() + get_constant("hseparation", "CheckBox") + get_constant("hseparator", "Tree");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bottom_editor != NULL && bottom_editor->is_visible()) {
|
if (bottom_editor != NULL && bottom_editor->is_visible()) {
|
||||||
|
|
@ -228,8 +228,7 @@ void EditorProperty::_notification(int p_what) {
|
||||||
}
|
}
|
||||||
check_rect = Rect2(ofs, ((size.height - checkbox->get_height()) / 2), checkbox->get_width(), checkbox->get_height());
|
check_rect = Rect2(ofs, ((size.height - checkbox->get_height()) / 2), checkbox->get_width(), checkbox->get_height());
|
||||||
draw_texture(checkbox, check_rect.position, color2);
|
draw_texture(checkbox, check_rect.position, color2);
|
||||||
ofs += get_constant("hseparator", "Tree");
|
ofs += get_constant("hseparator", "Tree") + checkbox->get_width() + get_constant("hseparation", "CheckBox");
|
||||||
ofs += checkbox->get_width();
|
|
||||||
text_limit -= ofs;
|
text_limit -= ofs;
|
||||||
} else {
|
} else {
|
||||||
check_rect = Rect2();
|
check_rect = Rect2();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue