summaryrefslogtreecommitdiffstats
path: root/scene/gui/separator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/separator.cpp')
-rw-r--r--scene/gui/separator.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/gui/separator.cpp b/scene/gui/separator.cpp
index b0879c1931..d0ca7c2e86 100644
--- a/scene/gui/separator.cpp
+++ b/scene/gui/separator.cpp
@@ -30,6 +30,8 @@
#include "separator.h"
+#include "scene/theme/theme_db.h"
+
Size2 Separator::get_minimum_size() const {
Size2 ms(3, 3);
if (orientation == VERTICAL) {
@@ -40,13 +42,6 @@ Size2 Separator::get_minimum_size() const {
return ms;
}
-void Separator::_update_theme_item_cache() {
- Control::_update_theme_item_cache();
-
- theme_cache.separation = get_theme_constant(SNAME("separation"));
- theme_cache.separator_style = get_theme_stylebox(SNAME("separator"));
-}
-
void Separator::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_DRAW: {
@@ -62,6 +57,11 @@ void Separator::_notification(int p_what) {
}
}
+void Separator::_bind_methods() {
+ BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, Separator, separation);
+ BIND_THEME_ITEM_CUSTOM(Theme::DATA_TYPE_STYLEBOX, Separator, separator_style, "separator");
+}
+
Separator::Separator() {
}