문제

I use CEF3 for displaying a web page in my Windows application. It works fine, but it doesn't scale if Windows has higher DPI settings (e.g. 150%). I don't expect it to do this automatically but I also don't find any property which can be set to tell chromium to scale. Is there any way to do that?

도움이 되었습니까?

해결책

Zoom and scale are different things as you already noticed. I think this is the formula you are looking for:

    public void SetScaleFactor(double scale)
    {
        double zoomLevel = Math.Log(scale, 1.2);
        this._browserHost.SetZoomLevel(zoomLevel);
    }

You can give it a try and see the difference with zoom.

Good luck!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top