salvadordf / CEF4Delphi

CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS.
https://www.briskbard.com/forum/
Other
1.2k stars 365 forks source link

Serious scaling issue #428

Closed DelphiBuilder closed 2 years ago

DelphiBuilder commented 2 years ago

First of all, thank you for such a great package. There are still some small problems, as with all new and great software. The issue I've found is this:

Open FMXTabbedBrowser. This works fine when you run it with Windows being ALREADY at 100% scale. If you scale it, it also scales fine.

HOWEVER, If you run this demo with Windows being at something different to 100% scale, all positioning is wrong, and also the browser shows some borders where the painting is not done. In that case, even when you set Windows back to 100%, it still is all out of the correct places.

This is under Delphi 10.4, I don't know if it is the same in 11, but I think it should.

I am also trying to find where the problem is, but I am lost in so much code.

salvadordf commented 2 years ago

Hi,

Thanks for reporting this issue!

Please download CEF4Delphi again and try again the FMXTabbedBrowser demo.

The current demo works correctly with these screen scales : 100%, 125%, 150% and 175% I tested it with a fully updated Delphi 11.1 Pro

If you still have scaling issues with Delphi 10.4 try to modify the TBrowserFrame.GetFMXWindowParentRect function to get the right position and size of each browser.