Fix: Window width/height was doubly-scaled with automatic DPI switch. (#11598)

This commit is contained in:
Peter Nelson 2023-12-18 13:05:06 +00:00 committed by GitHub
parent c05ffb22bd
commit b19a6c3b81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2002,8 +2002,6 @@ bool AdjustGUIZoom(bool automatic)
if (automatic) {
w->left = (w->left * _gui_scale) / old_scale;
w->top = (w->top * _gui_scale) / old_scale;
w->width = (w->width * _gui_scale) / old_scale;
w->height = (w->height * _gui_scale) / old_scale;
}
if (w->viewport != nullptr) {
w->viewport->zoom = Clamp(ZoomLevel(w->viewport->zoom - zoom_shift), _settings_client.gui.zoom_min, _settings_client.gui.zoom_max);