mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Fix-position tooltip should also be clamped inside render area
This commit is contained in:
		
							parent
							
								
									c31e1f5229
								
							
						
					
					
						commit
						d25780ae4a
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		|  | @ -6046,8 +6046,18 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) | |||
|             window->Pos = FindBestWindowPosForPopup(window); | ||||
|         else if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api && window_just_appearing_after_hidden_for_resize) | ||||
|             window->Pos = FindBestWindowPosForPopup(window); | ||||
|         else if ((flags & ImGuiWindowFlags_Tooltip) != 0 && !window_pos_set_by_api && !window_is_child_tooltip) | ||||
|             window->Pos = FindBestWindowPosForPopup(window); | ||||
|         // Orca: Allow fixed tooltip pos while still being clamped inside the render area
 | ||||
|         else if ((flags & ImGuiWindowFlags_Tooltip) != 0 && !window_is_child_tooltip) { | ||||
|             if (window_pos_set_by_api) { | ||||
|                 // Hack: add ImGuiWindowFlags_Popup so it does not follow cursor
 | ||||
|                 ImGuiWindowFlags old_flags = window->Flags; | ||||
|                 window->Flags |= ImGuiWindowFlags_Popup; | ||||
|                 window->Pos = FindBestWindowPosForPopup(window); | ||||
|                 window->Flags = old_flags; | ||||
|             } else { | ||||
|                 window->Pos = FindBestWindowPosForPopup(window); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // Calculate the range of allowed position for that window (to be movable and visible past safe area padding)
 | ||||
|         // When clamping to stay visible, we will enforce that window->Pos stays inside of visibility_rect.
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Noisyfox
						Noisyfox