mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-10-26 12:27:30 +00:00 
			
		
		
		
	Tables: Angled headers: fixed table contents overflowing when a list clipper is used. (#7416)
This commit is contained in:
		| @@ -59,6 +59,8 @@ Other changes: | |||||||
|   non-scrollable tables. (#7416) [@cfillion] |   non-scrollable tables. (#7416) [@cfillion] | ||||||
| - Tables: Angled headers: fixed borders not moving back up after TableAngleHeadersRow() | - Tables: Angled headers: fixed borders not moving back up after TableAngleHeadersRow() | ||||||
|   stops being called. (#7416) [@cfillion] |   stops being called. (#7416) [@cfillion] | ||||||
|  | - Tables: Angled headers: rounding header size to nearest integers, fixes some issues | ||||||
|  |   when using clipper. | ||||||
| - Menus, Popups: Fixed an issue where sibling menu popups re-opening in successive | - Menus, Popups: Fixed an issue where sibling menu popups re-opening in successive | ||||||
|   frames would erroneously close the window. While it is technically a popup issue |   frames would erroneously close the window. While it is technically a popup issue | ||||||
|   it would generally manifest when fast moving the mouse bottom to top in a sub-menu. |   it would generally manifest when fast moving the mouse bottom to top in a sub-menu. | ||||||
|   | |||||||
| @@ -3186,7 +3186,7 @@ void ImGui::TableAngledHeadersRowEx(float angle, float max_label_width) | |||||||
|     // Calculate our base metrics and set angled headers data _before_ the first call to TableNextRow() |     // Calculate our base metrics and set angled headers data _before_ the first call to TableNextRow() | ||||||
|     // FIXME-STYLE: Would it be better for user to submit 'max_label_width' or 'row_height' ? One can be derived from the other. |     // FIXME-STYLE: Would it be better for user to submit 'max_label_width' or 'row_height' ? One can be derived from the other. | ||||||
|     const float header_height = g.FontSize + g.Style.CellPadding.x * 2.0f; |     const float header_height = g.FontSize + g.Style.CellPadding.x * 2.0f; | ||||||
|     const float row_height = ImFabs(ImRotate(ImVec2(max_label_width, flip_label ? +header_height : -header_height), cos_a, sin_a).y); |     const float row_height = ImTrunc(ImFabs(ImRotate(ImVec2(max_label_width, flip_label ? +header_height : -header_height), cos_a, sin_a).y)); | ||||||
|     table->AngledHeadersHeight = row_height; |     table->AngledHeadersHeight = row_height; | ||||||
|     table->AngledHeadersSlope = (sin_a != 0.0f) ? (cos_a / sin_a) : 0.0f; |     table->AngledHeadersSlope = (sin_a != 0.0f) ? (cos_a / sin_a) : 0.0f; | ||||||
|     const ImVec2 header_angled_vector = unit_right * (row_height / -sin_a); // vector from bottom-left to top-left, and from bottom-right to top-right |     const ImVec2 header_angled_vector = unit_right * (row_height / -sin_a); // vector from bottom-left to top-left, and from bottom-right to top-right | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 cfillion
					cfillion