changeset 5179:88a48547ab6c

RT-32592: CSS: Table header render is incorrectly when set style "-fx-border-*" from Platform.runLater Reviewed-by: psomashe
author jgiles
date Fri, 27 Sep 2013 14:07:31 +1200
parents 62e08c34a629
children 42e0d1d0e0a5
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableHeaderRow.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableHeaderRow.java	Mon Sep 30 14:52:56 2013 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableHeaderRow.java	Fri Sep 27 14:07:31 2013 +1200
@@ -316,8 +316,9 @@
         header.resizeRelocate(x, snappedTopInset(), headerWidth, prefHeight);
         
         // position the filler region
-        double border = filler.getBoundsInLocal().getWidth() - filler.getLayoutBounds().getWidth();
-        double fillerWidth = tableWidth - headerWidth + border;
+        final Control control = tableSkin.getSkinnable();
+        final double controlInsets = control.snappedLeftInset() + control.snappedRightInset();
+        double fillerWidth = tableWidth - headerWidth + filler.getInsets().getLeft() - controlInsets;
         fillerWidth -= tableSkin.tableMenuButtonVisibleProperty().get() ? cornerWidth : 0;
         filler.setVisible(fillerWidth > 0);
         if (fillerWidth > 0) {