mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Hide Control focus when given via mouse input
This commit is contained in:
@@ -56,7 +56,7 @@ void Slider::gui_input(const Ref<InputEvent> &p_event) {
|
||||
if (mb->get_button_index() == MouseButton::LEFT) {
|
||||
if (mb->is_pressed()) {
|
||||
Ref<Texture2D> grabber;
|
||||
if (mouse_inside || has_focus()) {
|
||||
if (mouse_inside || has_focus(true)) {
|
||||
grabber = theme_cache.grabber_hl_icon;
|
||||
} else {
|
||||
grabber = theme_cache.grabber_icon;
|
||||
@@ -275,7 +275,7 @@ void Slider::_notification(int p_what) {
|
||||
Ref<StyleBox> style = theme_cache.slider_style;
|
||||
Ref<Texture2D> tick = theme_cache.tick_icon;
|
||||
|
||||
bool highlighted = editable && (mouse_inside || has_focus());
|
||||
bool highlighted = editable && (mouse_inside || has_focus(true));
|
||||
Ref<Texture2D> grabber;
|
||||
if (editable) {
|
||||
if (highlighted) {
|
||||
|
||||
Reference in New Issue
Block a user