more dpi experimentation

This commit is contained in:
Adam D. Ruppe 2022-08-23 21:57:30 -04:00
parent 06ce4090af
commit d88371e42c
2 changed files with 3 additions and 1 deletions

View File

@ -1849,7 +1849,7 @@ class SimpleWindow : CapableOfHandlingNativeEvent, CapableOfBeingDrawnUpon {
MonitorInfo.info ~= MonitorInfo( MonitorInfo.info ~= MonitorInfo(
Rectangle(Point(monitor.x, monitor.y), Size(monitor.width, monitor.height)), Rectangle(Point(monitor.x, monitor.y), Size(monitor.width, monitor.height)),
Size(monitor.mwidth, monitor.mheight), Size(monitor.mwidth, monitor.mheight),
cast(int) (customScalingFactorForMonitor(cast(int) idx) * 96) cast(int) (customScalingFactorForMonitor(cast(int) idx) * getDpi()[0])
); );
/+ /+

View File

@ -9047,6 +9047,8 @@ version(TerminalDirectToEmulator) {
auto xft = getXftDpi(); auto xft = getXftDpi();
if(xft is float.init) if(xft is float.init)
xft = 96; xft = 96;
// the xft passed as assumed means it will figure that's what the size
// is based on (which it is, inside xft) preventing the double scale problem
fontSize = widget.scaleWithDpi(fontSize, cast(int) xft); fontSize = widget.scaleWithDpi(fontSize, cast(int) xft);
} }