@@ -376,6 +376,10 @@ void SplitContainer::_notification(int p_what) {
376376 } break ;
377377 case NOTIFICATION_THEME_CHANGED: {
378378 update_minimum_size ();
379+ if (touch_dragger) {
380+ touch_dragger->set_modulate (theme_cache.touch_dragger_color );
381+ touch_dragger->set_texture (_get_touch_dragger_icon ());
382+ }
379383 } break ;
380384 }
381385}
@@ -542,7 +546,7 @@ void SplitContainer::set_touch_dragger_enabled(bool p_enabled) {
542546 touch_dragger->set_texture (_get_touch_dragger_icon ());
543547 touch_dragger->set_anchors_and_offsets_preset (Control::PRESET_CENTER);
544548 touch_dragger->set_default_cursor_shape (vertical ? CURSOR_VSPLIT : CURSOR_HSPLIT);
545- touch_dragger->set_modulate (Color ( 1 , 1 , 1 , 0.3 ) );
549+ touch_dragger->set_modulate (theme_cache. touch_dragger_color );
546550 touch_dragger->connect (SceneStringName (gui_input), callable_mp (this , &SplitContainer::_touch_dragger_gui_input));
547551 touch_dragger->connect (SceneStringName (mouse_exited), callable_mp (this , &SplitContainer::_touch_dragger_mouse_exited));
548552 dragging_area_control->add_child (touch_dragger, false , Node::INTERNAL_MODE_FRONT);
@@ -561,7 +565,7 @@ bool SplitContainer::is_touch_dragger_enabled() const {
561565
562566void SplitContainer::_touch_dragger_mouse_exited () {
563567 if (!dragging_area_control->dragging ) {
564- touch_dragger->set_modulate (Color ( 1 , 1 , 1 , 0.3 ) );
568+ touch_dragger->set_modulate (theme_cache. touch_dragger_color );
565569 }
566570}
567571
@@ -571,17 +575,16 @@ void SplitContainer::_touch_dragger_gui_input(const Ref<InputEvent> &p_event) {
571575 }
572576 Ref<InputEventMouseMotion> mm = p_event;
573577 Ref<InputEventMouseButton> mb = p_event;
574-
575578 if (mb.is_valid () && mb->get_button_index () == MouseButton::LEFT) {
576579 if (mb->is_pressed ()) {
577- touch_dragger->set_modulate (Color ( 1 , 1 , 1 , 1 ) );
580+ touch_dragger->set_modulate (theme_cache. touch_dragger_pressed_color );
578581 } else {
579- touch_dragger->set_modulate (Color ( 1 , 1 , 1 , 0.3 ) );
582+ touch_dragger->set_modulate (theme_cache. touch_dragger_color );
580583 }
581584 }
582585
583586 if (mm.is_valid () && !dragging_area_control->dragging ) {
584- touch_dragger->set_modulate (Color ( 1 , 1 , 1 , 0.6 ) );
587+ touch_dragger->set_modulate (theme_cache. touch_dragger_hover_color );
585588 }
586589}
587590
@@ -640,6 +643,9 @@ void SplitContainer::_bind_methods() {
640643 BIND_ENUM_CONSTANT (DRAGGER_HIDDEN);
641644 BIND_ENUM_CONSTANT (DRAGGER_HIDDEN_COLLAPSED);
642645
646+ BIND_THEME_ITEM (Theme::DATA_TYPE_COLOR, SplitContainer, touch_dragger_color);
647+ BIND_THEME_ITEM (Theme::DATA_TYPE_COLOR, SplitContainer, touch_dragger_pressed_color);
648+ BIND_THEME_ITEM (Theme::DATA_TYPE_COLOR, SplitContainer, touch_dragger_hover_color);
643649 BIND_THEME_ITEM (Theme::DATA_TYPE_CONSTANT, SplitContainer, separation);
644650 BIND_THEME_ITEM (Theme::DATA_TYPE_CONSTANT, SplitContainer, minimum_grab_thickness);
645651 BIND_THEME_ITEM (Theme::DATA_TYPE_CONSTANT, SplitContainer, autohide);
0 commit comments