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
@@ -27,6 +27,7 @@
|
||||
#include "table/strings.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
#include "zoom_func.h"
|
||||
|
||||
/** GUI for accessing waypoints and buoys. */
|
||||
struct WaypointWindow : Window {
|
||||
@@ -70,7 +71,7 @@ public:
|
||||
this->flags |= WF_DISABLE_VP_SCROLL;
|
||||
|
||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_W_VIEWPORT);
|
||||
nvp->InitializeViewport(this, this->GetCenterTile(), ZOOM_LVL_VIEWPORT);
|
||||
nvp->InitializeViewport(this, this->GetCenterTile(), ScaleZoomGUI(ZOOM_LVL_VIEWPORT));
|
||||
|
||||
this->OnInvalidateData(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user