Row height and icon scaling in Nattable with eclipse 19-09 [message #1814877] |
Sat, 21 September 2019 05:34  |
Eclipse User |
|
|
|
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 #1814892 is a reply to message #1814887] |
Sat, 21 September 2019 15:27   |
Eclipse User |
|
|
|
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 #1819124 is a reply to message #1815107] |
Wed, 08 January 2020 07:23   |
Eclipse User |
|
|
|
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 #1819171 is a reply to message #1819166] |
Thu, 09 January 2020 05:48  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.04740 seconds