From: Tuukka Lehtonen Date: Wed, 17 Jun 2020 21:01:10 +0000 (+0000) Subject: Merge "NatTable based Graph Explorer styling fixes" X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=21bef5bfa30007c081028f4f40d52a20c43794ca;hp=d40b57f5d1cb14a5af0d7496fcce25e15493337d Merge "NatTable based Graph Explorer styling fixes" --- diff --git a/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GENatTableThemeConfiguration.java b/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GENatTableThemeConfiguration.java index 80882b46c..c1551274e 100644 --- a/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GENatTableThemeConfiguration.java +++ b/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GENatTableThemeConfiguration.java @@ -15,12 +15,14 @@ public class GENatTableThemeConfiguration extends ModernNatTableThemeConfigurati public GENatTableThemeConfiguration(GETreeData treeData, int style) { super(); + TextPainter cellTextPainter = new TextPainter(); + cellTextPainter.setTrimText(false); this.oddRowBgColor = GUIHelper.getColor(250, 250, 250); this.defaultCellPainter = new GEStyler(treeData, new GEIconPainter( new PaddingDecorator( - new TextPainter(), + cellTextPainter, 0, 5, 0, diff --git a/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GEStyler.java b/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GEStyler.java index c9c37ab50..e773ebb00 100644 --- a/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GEStyler.java +++ b/bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GEStyler.java @@ -42,6 +42,8 @@ public class GEStyler extends CellPainterWrapper{ style.setAttributeValue(CellStyleAttributes.IMAGE, image); wrapper.setSpecificConfigAttribute(CellConfigAttributes.CELL_STYLE, DisplayMode.NORMAL, "BODY", style); + wrapper.setSpecificConfigAttribute(CellConfigAttributes.CELL_STYLE, DisplayMode.SELECT, "BODY", style); + wrapper.setSpecificConfigAttribute(CellConfigAttributes.CELL_STYLE, DisplayMode.SELECT_HOVER, "BODY", style); // wrapper.setSpecificConfigAttribute(CellStyleAttributes.FOREGROUND_COLOR, DisplayMode.NORMAL, "BODY", style.getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR)); // wrapper.setSpecificConfigAttribute(CellStyleAttributes.BACKGROUND_COLOR, DisplayMode.NORMAL, "BODY", style.getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR)); // wrapper.setSpecificConfigAttribute(CellStyleAttributes.FONT, DisplayMode.NORMAL, "BODY", style.getAttributeValue(CellStyleAttributes.FONT));