Issue with zoom out text size [message #1861662] |
Wed, 25 October 2023 18:05 ![Go to next message Go to next message](https://www.eclipse.org/forums/theme/Solstice/images/down.png) |
Louis Detweiler![Friend of Eclipse Friend](https://www.eclipse.org/donate/web-api/friends_decorator.php?email=greg.detweiler42%40gmail.com) Messages: 98 Registered: August 2017 |
Member |
|
|
Hi Dirk,
We recently added the zooming UI bindings to our NatTables, and we have run into a slight problem. Everything works fine, aside from the maximum zoom out, when the DPI is set to 12. In this case the text size in our row header and body region seems to be set to the default scaling instead of with the DPI at 12. Interestingly, our column header region does not have this problem.
This issue does not appear in the NatTable examples, and so it is something on our end.
Debugging the paintCell method in the TextPainter class, our column header cells has gc.getFontMetrics().getHeight() return 2 as expected, whereas our row header and body region cells has gc.getFontMetrics().getHeight() return 21. Looking into these methods it seems the GC's FontMetrics class has the handle.tmHeight set to 2 and 21 respectively, and the method autoScaleDown in DPIUtil simply returns this value back, so getHeight() just returns these values.
We have a lot of customization in our NatTables, so I don't expect you to be able to know exactly what our problem is, but do you have any idea where we could be going wrong, and why the GC's FontMetrics has the correct height in our column header region, but not in our row header or body region?
Thanks for your time,
Louis Detweiler
|
|
|
|
Powered by
FUDForum. Page generated in 0.02080 seconds