mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Scrolling: Fixed scrolling centering API leading to non-integer scrolling values and initial cursor position. (#3073)
This would often get fixed after the fix item submission, but using the ImGuiListClipper as the first thing after Begin() could largely break size calculations. (#3073)
This commit is contained in:
		@@ -45,6 +45,9 @@ Other Changes:
 | 
				
			|||||||
  when the menu is not open. (#3030)
 | 
					  when the menu is not open. (#3030)
 | 
				
			||||||
- InputText: Fixed password fields displaying ASCII spaces as blanks instead of using the '*'
 | 
					- InputText: Fixed password fields displaying ASCII spaces as blanks instead of using the '*'
 | 
				
			||||||
  glyph. (#2149, #515)
 | 
					  glyph. (#2149, #515)
 | 
				
			||||||
 | 
					- Scrolling: Fixed scrolling centering API leading to non-integer scrolling values and initial
 | 
				
			||||||
 | 
					  cursor position. This would often get fixed after the fix item submission, but using the
 | 
				
			||||||
 | 
					  ImGuiListClipper as the first thing after Begin() could largely break size calculations. (#3073)
 | 
				
			||||||
- Added optional support for Unicode plane 1-16 (#2538, #2541, #2815) [@cloudwu, @samhocevar]
 | 
					- Added optional support for Unicode plane 1-16 (#2538, #2541, #2815) [@cloudwu, @samhocevar]
 | 
				
			||||||
  - Compile-time enable with '#define ImWchar ImWchar32' in imconfig.h.
 | 
					  - Compile-time enable with '#define ImWchar ImWchar32' in imconfig.h.
 | 
				
			||||||
  - Generally more consistent support for unsupported codepoints (0xFFFD), in particular when
 | 
					  - Generally more consistent support for unsupported codepoints (0xFFFD), in particular when
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7283,7 +7283,8 @@ static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window, bool s
 | 
				
			|||||||
            target_y = window->ContentSize.y + window->WindowPadding.y * 2.0f;
 | 
					            target_y = window->ContentSize.y + window->WindowPadding.y * 2.0f;
 | 
				
			||||||
        scroll.y = target_y - cr_y * (window->SizeFull.y - window->ScrollbarSizes.y - decoration_up_height);
 | 
					        scroll.y = target_y - cr_y * (window->SizeFull.y - window->ScrollbarSizes.y - decoration_up_height);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    scroll = ImMax(scroll, ImVec2(0.0f, 0.0f));
 | 
					    scroll.x = IM_FLOOR(ImMax(scroll.x, 0.0f));
 | 
				
			||||||
 | 
					    scroll.y = IM_FLOOR(ImMax(scroll.y, 0.0f));
 | 
				
			||||||
    if (!window->Collapsed && !window->SkipItems)
 | 
					    if (!window->Collapsed && !window->SkipItems)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        scroll.x = ImMin(scroll.x, window->ScrollMax.x);
 | 
					        scroll.x = ImMin(scroll.x, window->ScrollMax.x);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user