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

@@ -33,6 +33,7 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
#include "scene/main/window.h"
#include "scene/theme/theme_db.h"
Size2 ScrollContainer::get_minimum_size() const {
Size2 min_size;
@@ -80,12 +81,6 @@ Size2 ScrollContainer::get_minimum_size() const {
return min_size;
}
void ScrollContainer::_update_theme_item_cache() {
Container::_update_theme_item_cache();
theme_cache.panel_style = get_theme_stylebox(SNAME("panel"));
}
void ScrollContainer::_cancel_drag() {
set_physics_process_internal(false);
drag_touching_deaccel = false;
@@ -627,6 +622,8 @@ void ScrollContainer::_bind_methods() {
BIND_ENUM_CONSTANT(SCROLL_MODE_SHOW_ALWAYS);
BIND_ENUM_CONSTANT(SCROLL_MODE_SHOW_NEVER);
BIND_THEME_ITEM_CUSTOM(Theme::DATA_TYPE_STYLEBOX, ScrollContainer, panel_style, "panel");
GLOBAL_DEF("gui/common/default_scroll_deadzone", 0);
};