From 8cf8163295ffc6b25dfdebc3dc89467c56684da1 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Thu, 5 Jan 2017 16:45:59 +0200 Subject: [PATCH] Disabling display scaling code. refs #6940 Change-Id: If563e24f8a48f9bb85491721a662184fe5d5fa82 --- .../ui/nattable/NatTableGraphExplorer.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java b/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java index 5726b5130..cc978e7e8 100644 --- a/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java +++ b/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java @@ -1517,10 +1517,14 @@ public class NatTableGraphExplorer extends GraphExplorerImplBase implements Grap columnAccessor = new GEColumnAccessor(this); IDataProvider dataProvider = new ListDataProvider(list, columnAccessor); - - int defaultFontSize = 12; - int height = (int)Math.ceil(((double)(defaultFontSize))*getDisplayScale()) + DataLayer.DEFAULT_ROW_HEIGHT-defaultFontSize; - dataLayer = new DataLayer(dataProvider, DataLayer.DEFAULT_COLUMN_WIDTH, height); + +// FIXME: NatTable 1.0 required help to work with custom display scaling (Windows 7 display scaling). +// It seems that NatTable 1.4 breaks with the same code in Windows 7, so now the code is disabled. +// More testing with different hardware is required... +// int defaultFontSize = 12; +// int height = (int)Math.ceil(((double)(defaultFontSize))*getDisplayScale()) + DataLayer.DEFAULT_ROW_HEIGHT-defaultFontSize; +// dataLayer = new DataLayer(dataProvider, DataLayer.DEFAULT_COLUMN_WIDTH, height); + dataLayer = new DataLayer(dataProvider); // resizable rows are unnecessary in Sulca report. dataLayer.setRowsResizableByDefault(false); @@ -1535,7 +1539,7 @@ public class NatTableGraphExplorer extends GraphExplorerImplBase implements Grap // Column header layer columnHeaderDataProvider = new GEColumnHeaderDataProvider(this, dataLayer); columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(columnHeaderDataProvider); - columnHeaderDataLayer.setDefaultRowHeight(height); + //columnHeaderDataLayer.setDefaultRowHeight(height); columnHeaderDataProvider.updateColumnSizes(); //ISortModel sortModel = new EcoSortModel(this, generator,dataLayer); -- 2.47.1