Frage

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?

War es hilfreich?

Lösung

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!

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top