Skip to main content



      Home
Home » Eclipse Projects » NatTable » Row height and icon scaling in Nattable with eclipse 19-09
Row height and icon scaling in Nattable with eclipse 19-09 [message #1814877] Sat, 21 September 2019 05:34 Go to next message
Eclipse UserFriend
HI All,

I have just updated the to the latest nattablev1.6 and eclipse-19-09, i am seeing a distortion of icons due to resizing and height of rows also changed, along with the font size.

Does anyone have a clue why this is happening?



OS : Ubuntu 18.04
Eclipse : eclipse-19-09
Resolution : 1920x1080 FHD.


Regards,
Abhishek

[Updated on: Sat, 21 September 2019 15:29] by Moderator

Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1814887 is a reply to message #1814877] Sat, 21 September 2019 11:27 Go to previous messageGo to next message
Eclipse UserFriend
First you should only update one thing at a time to better understand which update is causing this. Although I am not really sure what you see as an issue. The animated gif only shows our examples and for me it looks OK. Or what do you want to show with that gif?

We fixed some scaling issues with NatTable 1.6. So maybe it is related to that if you have enabled scaling on your system.
Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1814892 is a reply to message #1814887] Sat, 21 September 2019 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dirk,

Thanks again, yes now I have reverted back to v1.5 , but the scaling problem is still present, I have check out nattable branch with tag 1.5.0 , and use eclipse 19-09 to run the product. the result is on the left side, whereas the samples application downloaded is in the right side of the attached image [Comparision_Nattable.png], I think scaling is done automatically, i have not changed the setting in ubuntu .

See the size of filter icon that is also distorted.

[Updated on: Sat, 21 September 2019 15:51] by Moderator

Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1814893 is a reply to message #1814892] Sat, 21 September 2019 15:50 Go to previous messageGo to next message
Eclipse UserFriend
Also in windows 10 Eclipse 19-09 with nattable 1.6 , there is not auto scaling.

Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1814894 is a reply to message #1814893] Sat, 21 September 2019 17:59 Go to previous messageGo to next message
Eclipse UserFriend
Sounds like a scaling issue on gtk. Please raise your request then on the SWT forum. Doesn't seem to be related to NatTable.
Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1815107 is a reply to message #1814894] Wed, 25 September 2019 10:12 Go to previous messageGo to next message
Eclipse UserFriend
https://bugs.eclipse.org/bugs/show_bug.cgi?id=551456
Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1819124 is a reply to message #1815107] Wed, 08 January 2020 07:23 Go to previous messageGo to next message
Eclipse UserFriend

https://www.eclipse.org/forums/index.php?t=usrinfo&id=139646&


I believe the issue is related to GuiHelper class also, as it try to find out the DPI and the new Device.java class the getScreenDPI is returning more accurate number 161 in my box, for 4K resolution, for which there is no image present org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/images

public static String getScalingImageSuffix() {
return "_" + getDpiX() + "_" + getDpiY(); //$NON-NLS-1$ //$NON-NLS-2$
}


Point getScreenDPI () {
int dpi = 96; //default value
if (GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) {
long display = GDK.gdk_display_get_default();
long pMonitor = GDK.gdk_display_get_primary_monitor(display);
if (pMonitor == 0) {
pMonitor = GDK.gdk_display_get_monitor(display, 0);
}
int widthMM = GDK.gdk_monitor_get_width_mm(pMonitor);
if (widthMM == 0) return new Point (dpi, dpi);
int scaleFactor = GDK.gdk_monitor_get_scale_factor(pMonitor);
GdkRectangle monitorGeometry = new GdkRectangle ();
GDK.gdk_monitor_get_geometry(pMonitor, monitorGeometry);
dpi = Compatibility.round (254 * monitorGeometry.width * scaleFactor, widthMM * 10);
}
return new Point (dpi, dpi);
}
Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1819127 is a reply to message #1819124] Wed, 08 January 2020 08:05 Go to previous messageGo to next message
Eclipse UserFriend
And if there is no image for that resolution it gets upscaled. So what are you trying to tell me? The only optimization I could think of would be to check for the highest available resolution for scaling. It is simply impossible to provide scaled images for every possible user setting.
Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1819137 is a reply to message #1819127] Wed, 08 January 2020 10:17 Go to previous messageGo to next message
Eclipse UserFriend
Yes finding the floor or ceiling value, could solve this problem.

Is image size is also affecting the row height, as I have disabled all the images and but still the row height is calculated to be higher?

[Updated on: Wed, 08 January 2020 10:19] by Moderator

Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1819140 is a reply to message #1819137] Wed, 08 January 2020 11:55 Go to previous messageGo to next message
Eclipse UserFriend
Row height calculation is done in SizeConfig based on the scaling value
Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1819163 is a reply to message #1819140] Thu, 09 January 2020 03:24 Go to previous messageGo to next message
Eclipse UserFriend
SizeConfig dpiConverter stores 144 for eclipse 2019-09 and 96 for Oxygen.

More accurate calculation for DPI is creating all these behaviour. Do you plan to provide a fix for this or any alternative though which i can override the sizeConfig?
Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1819166 is a reply to message #1819163] Thu, 09 January 2020 03:52 Go to previous messageGo to next message
Eclipse UserFriend
No Message Body

[Updated on: Thu, 09 January 2020 04:23] by Moderator

Re: Row height and icon scaling in Nattable 1.6.0 vs 1.5 [message #1819171 is a reply to message #1819166] Thu, 09 January 2020 05:48 Go to previous message
Eclipse UserFriend
Why is there a different value in the dpi converter in different versions of Eclipse? I do not see such a behavior on windows. Therefore I am not sure how to fix something I can't reproduce. Moreover, if the scaling behavior was fixed in SWT for GTK, what should I fix in NatTable? AFAICS NatTable takes the DPI value from the default Display for scaling. If 144 is the value delivered by Display that's it. What should I fix here?

You should be able to change the scaling by executing a ConfigureScalingCommand with different values to change the scaling behavior.
Previous Topic:Instances of NatTable are beeing kept in memory after composite is disposed
Next Topic:Last Group headers not appearing for performance ColumnGroupHeaderLayer
Goto Forum:
  


Current Time: Sun May 18 04:43:55 EDT 2025

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

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

Back to the top