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