@ -3330,7 +3330,7 @@ void ImGui::UpdateMouseWheel()
// Zoom / Scale window
// Zoom / Scale window
// FIXME-OBSOLETE: This is an old feature, it still works but pretty much nobody is using it and may be best redesigned.
// FIXME-OBSOLETE: This is an old feature, it still works but pretty much nobody is using it and may be best redesigned.
if ( g . IO . MouseWheel ! = 0.0f & & g . IO . KeyCtrl & & g . IO . FontAllowUserScaling )
if ( g . IO . MouseWheel ! = 0.0f & & g . IO . KeyCtrl & & g . IO . FontAllowUserScaling & & ! window - > Collapsed )
{
{
const float new_font_scale = ImClamp ( window - > FontWindowScale + g . IO . MouseWheel * 0.10f , 0.50f , 2.50f ) ;
const float new_font_scale = ImClamp ( window - > FontWindowScale + g . IO . MouseWheel * 0.10f , 0.50f , 2.50f ) ;
const float scale = new_font_scale / window - > FontWindowScale ;
const float scale = new_font_scale / window - > FontWindowScale ;
@ -3338,7 +3338,7 @@ void ImGui::UpdateMouseWheel()
if ( ! ( window - > Flags & ImGuiWindowFlags_ChildWindow ) )
if ( ! ( window - > Flags & ImGuiWindowFlags_ChildWindow ) )
{
{
const ImVec2 offset = window - > Size * ( 1.0f - scale ) * ( g . IO . MousePos - window - > Pos ) / window - > Size ;
const ImVec2 offset = window - > Size * ( 1.0f - scale ) * ( g . IO . MousePos - window - > Pos ) / window - > Size ;
window- > Pos = ImFloor ( window - > Pos + offset ) ;
SetWindowPos( window , window - > Pos + offset , 0 ) ;
window - > Size = ImFloor ( window - > Size * scale ) ;
window - > Size = ImFloor ( window - > Size * scale ) ;
window - > SizeFull = ImFloor ( window - > SizeFull * scale ) ;
window - > SizeFull = ImFloor ( window - > SizeFull * scale ) ;
}
}
@ -8398,7 +8398,7 @@ static void ImGui::NavUpdateWindowing()
{
{
const float NAV_MOVE_SPEED = 800.0f ;
const float NAV_MOVE_SPEED = 800.0f ;
const float move_speed = ImFloor ( NAV_MOVE_SPEED * g . IO . DeltaTime * ImMin ( g . IO . DisplayFramebufferScale . x , g . IO . DisplayFramebufferScale . y ) ) ; // FIXME: Doesn't code variable framerate very well
const float move_speed = ImFloor ( NAV_MOVE_SPEED * g . IO . DeltaTime * ImMin ( g . IO . DisplayFramebufferScale . x , g . IO . DisplayFramebufferScale . y ) ) ; // FIXME: Doesn't code variable framerate very well
g. NavWindowingTarget - > RootWindow - > Pos + = move_delta * move_speed ;
SetWindowPos( g . NavWindowingTarget - > RootWindow , g. NavWindowingTarget - > RootWindow - > Pos + move_delta * move_speed , ImGuiCond_Always ) ;
g . NavDisableMouseHover = true ;
g . NavDisableMouseHover = true ;
MarkIniSettingsDirty ( g . NavWindowingTarget ) ;
MarkIniSettingsDirty ( g . NavWindowingTarget ) ;
}
}