mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 05:01:05 +01:00 
			
		
		
		
	Nav: Tweak windowing highlighting for full viewport windows.
This commit is contained in:
		
							
								
								
									
										10
									
								
								imgui.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								imgui.cpp
									
									
									
									
									
								
							| @@ -5999,11 +5999,15 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) | |||||||
|         // Draw navigation selection/windowing rectangle border |         // Draw navigation selection/windowing rectangle border | ||||||
|         if (g.NavWindowingTarget == window) |         if (g.NavWindowingTarget == window) | ||||||
|         { |         { | ||||||
|  |             float rounding = ImMax(window->WindowRounding, g.Style.WindowRounding); | ||||||
|             ImRect bb = window->Rect(); |             ImRect bb = window->Rect(); | ||||||
|             bb.Expand(g.FontSize); |             bb.Expand(g.FontSize); | ||||||
|             if (bb.Contains(viewport_rect)) |             if (bb.Contains(viewport_rect)) // If a window fits the entire viewport, adjust its highlight inward | ||||||
|                 bb.Expand(-g.FontSize - 2.0f); |             { | ||||||
|             window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), g.Style.WindowRounding, ~0, 3.0f); |                 bb.Expand(-g.FontSize - 1.0f); | ||||||
|  |                 rounding = window->WindowRounding; | ||||||
|  |             } | ||||||
|  |             window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), rounding, ~0, 3.0f); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // Store a backup of SizeFull which we will use next frame to decide if we need scrollbars.  |         // Store a backup of SizeFull which we will use next frame to decide if we need scrollbars.  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user