mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 21:51:22 +00:00 
			
		
		
		
	Display arrow cursor if text is not editable
This commit is contained in:
		
							parent
							
								
									8976594f4b
								
							
						
					
					
						commit
						c3967c80ab
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -557,7 +557,7 @@ void LineEdit::drop_data(const Point2 &p_point, const Variant &p_data) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Control::CursorShape LineEdit::get_cursor_shape(const Point2 &p_pos) const { | Control::CursorShape LineEdit::get_cursor_shape(const Point2 &p_pos) const { | ||||||
| 	if (!text.is_empty() && is_editable() && _is_over_clear_button(p_pos)) { | 	if ((!text.is_empty() && is_editable() && _is_over_clear_button(p_pos)) || (!is_editable() && (!is_selecting_enabled() || text.is_empty()))) { | ||||||
| 		return CURSOR_ARROW; | 		return CURSOR_ARROW; | ||||||
| 	} | 	} | ||||||
| 	return Control::get_cursor_shape(p_pos); | 	return Control::get_cursor_shape(p_pos); | ||||||
|  |  | ||||||
|  | @ -4450,7 +4450,7 @@ Control::CursorShape TextEdit::get_cursor_shape(const Point2 &p_pos) const { | ||||||
| 		return CURSOR_POINTING_HAND; | 		return CURSOR_POINTING_HAND; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if ((completion_active && completion_rect.has_point(p_pos))) { | 	if ((completion_active && completion_rect.has_point(p_pos)) || (is_readonly() && (!is_selecting_enabled() || text.size() == 0))) { | ||||||
| 		return CURSOR_ARROW; | 		return CURSOR_ARROW; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 kobewi
						kobewi