Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:34 Go to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

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


Regards,
Abhishek Chakraborty

[Updated on: Sat, 21 September 2019 19:29]

Report message to a 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 15:27 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
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 19:27 Go to previous messageGo to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

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.


Regards,
Abhishek Chakraborty

[Updated on: Sat, 21 September 2019 19:51]

Report message to a 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 19:50 Go to previous messageGo to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

Also in windows 10 Eclipse 19-09 with nattable 1.6 , there is not auto scaling.



Regards,
Abhishek Chakraborty
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 21:59 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
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 14:12 Go to previous messageGo to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

https://bugs.eclipse.org/bugs/show_bug.cgi?id=551456

Regards,
Abhishek Chakraborty
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 12:23 Go to previous messageGo to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member


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);
}


Regards,
Abhishek Chakraborty
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 13:05 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
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 15:17 Go to previous messageGo to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

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?


Regards,
Abhishek Chakraborty

[Updated on: Wed, 08 January 2020 15:19]

Report message to a 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 16:55 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
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 08:24 Go to previous messageGo to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

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?


Regards,
Abhishek Chakraborty
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 08:52 Go to previous messageGo to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

No Message Body

Regards,
Abhishek Chakraborty

[Updated on: Thu, 09 January 2020 09:23]

Report message to a 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 10:48 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
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 Jun 20 23:31:37 GMT 2021

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

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

Back to the top