Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Issue with zoom out text size
Issue with zoom out text size [message #1861662] Wed, 25 October 2023 18:05 Go to next message
Louis Detweiler is currently offline Louis DetweilerFriend
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
Re: Issue with zoom out text size [message #1861665 is a reply to message #1861662] Thu, 26 October 2023 07:33 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2900
Registered: July 2012
Senior Member
Hi,

I can only remember that I had issues in the past related to rounding issues.

I have created the following ticket a few years ago, that actually never got attention: https://bugs.eclipse.org/bugs/show_bug.cgi?id=559884

Not sure if this is related somehow, but maybe worth to look at it. You could also check the font itself. Are the fonts different in the column header and the row header and body? Maybe that has an effect?

P.S. Not sure when this forum will be shut down. But I have enabled Discussions on GitHub so we can have all information in one place in the future.

https://github.com/eclipse-nattable/nattable/discussions

Previous Topic:NatTable @ GitHub
Goto Forum:
  


Current Time: Sat Nov 11 06:08:28 GMT 2023

Powered by FUDForum. Page generated in 0.02080 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top