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
@@ -310,7 +310,7 @@ struct NewsWindow : Window {
|
||||
/* Initialize viewport if it exists. */
|
||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_N_VIEWPORT);
|
||||
if (nvp != nullptr) {
|
||||
nvp->InitializeViewport(this, ni->reftype1 == NR_VEHICLE ? 0x80000000 | ni->ref1 : (uint32)GetReferenceTile(ni->reftype1, ni->ref1), ZOOM_LVL_NEWS);
|
||||
nvp->InitializeViewport(this, ni->reftype1 == NR_VEHICLE ? 0x80000000 | ni->ref1 : (uint32)GetReferenceTile(ni->reftype1, ni->ref1),ScaleZoomGUI(ZOOM_LVL_NEWS));
|
||||
if (this->ni->flags & NF_NO_TRANSPARENT) nvp->disp_flags |= ND_NO_TRANSPARENCY;
|
||||
if ((this->ni->flags & NF_INCOLOUR) == 0) {
|
||||
nvp->disp_flags |= ND_SHADE_GREY;
|
||||
|
Reference in New Issue
Block a user