]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Disabling display scaling code.
authorMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 5 Jan 2017 14:45:59 +0000 (16:45 +0200)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 5 Jan 2017 14:45:59 +0000 (16:45 +0200)
refs #6940

Change-Id: If563e24f8a48f9bb85491721a662184fe5d5fa82

bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableGraphExplorer.java

index 5726b51303879cf301b94ad1b3256dfad2938b18..cc978e7e8b6ce599957ff6fbb859c76ec96a0d96 100644 (file)
@@ -1517,10 +1517,14 @@ public class NatTableGraphExplorer extends GraphExplorerImplBase implements Grap
                columnAccessor = new GEColumnAccessor(this);
                
                IDataProvider dataProvider = new ListDataProvider<TreeNode>(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);