From ce54ba60a7c95ab793e1342a15671155d4091d15 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Thu, 8 Feb 2018 10:08:43 +0100 Subject: [PATCH] Respecting table cell padding --- .../com/rhubarb_lip_sync/rhubarb_for_spine/MainView.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extras/rhubarb-for-spine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/MainView.kt b/extras/rhubarb-for-spine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/MainView.kt index 56bf74e..1ca39e8 100644 --- a/extras/rhubarb-for-spine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/MainView.kt +++ b/extras/rhubarb-for-spine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/MainView.kt @@ -88,7 +88,10 @@ class MainView : View() { cell.graphic = Text().apply { textProperty().bind(cell.itemProperty()) fillProperty().bind(cell.textFillProperty()) - wrappingWidthProperty().bind(tableColumn.widthProperty()) + val widthProperty = tableColumn.widthProperty() + .minus(cell.paddingLeftProperty) + .minus(cell.paddingRightProperty) + wrappingWidthProperty().bind(widthProperty) } cell.prefHeight = Control.USE_COMPUTED_SIZE }