From dc3787220480476c3f89c027dd9d8c0def13c73b Mon Sep 17 00:00:00 2001 From: IARI Date: Sat, 13 Jun 2020 10:30:47 +0200 Subject: [PATCH] fixed an issue with the top column-width-bar layout --- .../ettiketten/view/tabs/DocumentTab.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/com/julianjarecki/ettiketten/view/tabs/DocumentTab.kt b/src/main/kotlin/com/julianjarecki/ettiketten/view/tabs/DocumentTab.kt index 523c212..b0e7d1e 100644 --- a/src/main/kotlin/com/julianjarecki/ettiketten/view/tabs/DocumentTab.kt +++ b/src/main/kotlin/com/julianjarecki/ettiketten/view/tabs/DocumentTab.kt @@ -35,6 +35,11 @@ class DocumentTab : AppTab("Document", MaterialDesignIcon.LABEL_OUTLINE.view) { val data: LabelsDocumentDataModel by inject() val tgroupH = ToggleGroup() val tgroupV = ToggleGroup() + private val paddingLeftBinding = data.controlLabelV.doubleBinding { + log.info("Doc controlLabelV: $it") + if (it ?: true) .0 else Styles.labelsLeftBarWidth + } + val selectedLabels = observableListOf() @@ -205,12 +210,7 @@ class DocumentTab : AppTab("Document", MaterialDesignIcon.LABEL_OUTLINE.view) { top { listview(data.columns) { addClass(Styles.gridLineList) - paddingLeftProperty.bind( - data.controlLabelV.doubleBinding { - if (it ?: false) .0 else Styles.labelsLeftBarWidth - } - ) - paddingLeft = Styles.labelsLeftBarWidth + paddingLeftProperty.bind(paddingLeftBinding) orientation = Orientation.HORIZONTAL prefHeight = Styles.labelsTopRowHeight cellFragment(GridLineFragment::class)