Author Topic: Adding a ViewScale property to THtmlViewer  (Read 594 times)


  • Newbie
  • Posts: 1
Adding a ViewScale property to THtmlViewer
« on: February 28, 2021, 08:56:32 am »
I've just started maintaining a project that uses THtmlViewer. It has a modified version of the THtmlViewer component that implements (very crudely) a scaling feature, so the UI can be scaled to increase/decrease the size, similar to the zoom functionality in most browsers these days...

I think that adding a ViewScale property (similar to the existing PrintScale) would be a useful feature - the question is how best to implement it.

The crude approach taken by the project I'm working on is to access a scaling factor as a global variable from within the FontSizeConv() and LengthConv() functions in StyleUn.pas. This is really ugly and creates a dependency between the component and the application which I want to remove.

I'm wondering about changing the mapping mode in the same way the PrintScale is applied, but:
1) I'm not sure where to do this,
2) I need something portable (supporting both Windows and Linux)


TinyPortal © 2005-2018