File tree Expand file tree Collapse file tree
libraries/block-kit/ui/src/main/kotlin/io/adventech/blockkit/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,13 +139,25 @@ fun TableContent(
139139 strokeWidth = borderWidthPx
140140 )
141141 }
142+
143+ // Draw horizontal dividers
144+ var divY = 0f
145+ for (r in 0 until layoutInfo.rowHeights.size - 1 ) {
146+ divY + = layoutInfo.rowHeights[r]
147+ drawLine(
148+ color = borderColor,
149+ start = Offset (0f , divY),
150+ end = Offset (size.width, divY),
151+ strokeWidth = borderWidthPx
152+ )
153+ }
142154 },
143155 content = {
144156 allRows.forEach { rowCells ->
145157 for (c in 0 until columnCount) {
146158 val cell = rowCells.getOrNull(c)
147159 if (cell != null ) {
148- Box (modifier = Modifier , contentAlignment = Alignment .CenterStart ) {
160+ Box (modifier = Modifier , contentAlignment = Alignment .TopStart ) {
149161 Column {
150162 cell.items.forEach { item ->
151163 BlockContent (
@@ -194,8 +206,7 @@ fun TableContent(
194206 var x = 0
195207 for (c in 0 until columnCount) {
196208 val placeable = placeables[r * columnCount + c]
197- val yOffset = y + (rowHeights[r] - placeable.height) / 2
198- placeable.placeRelative(x, yOffset)
209+ placeable.placeRelative(x, y)
199210
200211 x + = columnWidths[c]
201212 }
You can’t perform that action at this time.
0 commit comments