1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Register theme properties with ThemeDB

This commit is contained in:
Yuri Sizov
2023-09-08 21:00:10 +02:00
parent 8c1817f755
commit 2924bfd4d3
71 changed files with 837 additions and 802 deletions

View File

@@ -29,14 +29,9 @@
/**************************************************************************/
#include "grid_container.h"
#include "core/templates/rb_set.h"
void GridContainer::_update_theme_item_cache() {
Container::_update_theme_item_cache();
theme_cache.h_separation = get_theme_constant(SNAME("h_separation"));
theme_cache.v_separation = get_theme_constant(SNAME("v_separation"));
}
#include "scene/theme/theme_db.h"
void GridContainer::_notification(int p_what) {
switch (p_what) {
@@ -269,6 +264,9 @@ void GridContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_columns"), &GridContainer::get_columns);
ADD_PROPERTY(PropertyInfo(Variant::INT, "columns", PROPERTY_HINT_RANGE, "1,1024,1"), "set_columns", "get_columns");
BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, GridContainer, h_separation);
BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, GridContainer, v_separation);
}
Size2 GridContainer::get_minimum_size() const {