Question

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?

Était-ce utile?

La solution

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!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top