Fix #9995: Adjust viewport zoom level for HiDPI displays
On HiDPI screens the zoom level is increased for detailed rendering. This causes hard-coded zoom levels to be off by this adjustment. To fix these default zoom levels, we scale the zoom level based on `_gui_zoom` to get the scaled zoom level.
This commit is contained in:

committed by
Michael Lutz

parent
47a998fb0c
commit
93d2d4590f
@@ -57,8 +57,8 @@ public:
|
||||
this->InitNested(window_number);
|
||||
|
||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_EV_VIEWPORT);
|
||||
nvp->InitializeViewport(this, 0, ZOOM_LVL_VIEWPORT);
|
||||
if (_settings_client.gui.zoom_min == ZOOM_LVL_VIEWPORT) this->DisableWidget(WID_EV_ZOOM_IN);
|
||||
nvp->InitializeViewport(this, 0, ScaleZoomGUI(ZOOM_LVL_VIEWPORT));
|
||||
if (_settings_client.gui.zoom_min == viewport->zoom) this->DisableWidget(WID_EV_ZOOM_IN);
|
||||
|
||||
Point pt;
|
||||
if (tile == INVALID_TILE) {
|
||||
|
Reference in New Issue
Block a user