From d3bb5717acb77a4ec7fad97a08571f4baef9e839 Mon Sep 17 00:00:00 2001 From: mkpaz Date: Tue, 30 May 2023 16:14:34 +0400 Subject: [PATCH] Add support for NO_HEADER tweak in tables --- .../main/java/atlantafx/base/theme/Tweaks.java | 5 +++++ styles/src/components/_data.scss | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/base/src/main/java/atlantafx/base/theme/Tweaks.java b/base/src/main/java/atlantafx/base/theme/Tweaks.java index e23741c..65f145d 100644 --- a/base/src/main/java/atlantafx/base/theme/Tweaks.java +++ b/base/src/main/java/atlantafx/base/theme/Tweaks.java @@ -21,6 +21,11 @@ public final class Tweaks { */ public static final String EDGE_TO_EDGE = "edge-to-edge"; + /** + * Removes control header. + */ + public static final String NO_HEADER = "no-header"; + /** * Alignment. */ diff --git a/styles/src/components/_data.scss b/styles/src/components/_data.scss index 68b48c4..cd5b96d 100755 --- a/styles/src/components/_data.scss +++ b/styles/src/components/_data.scss @@ -390,6 +390,14 @@ $tree-cell-indent: 1.2em !default; // default JavaFX values is 18px } } +Add support for NO_HEADER tweak in tables &.no-header { + >.column-header-background { + -fx-max-height: 0; + -fx-pref-height: 0; + -fx-min-height: 0; + } + } + // each row in the table is a .table-row-cell, // inside a .table-row-cell is any number of .table-cell .table-row-cell { @@ -571,6 +579,14 @@ $tree-cell-indent: 1.2em !default; // default JavaFX values is 18px } } + &.no-header { + >.column-header-background { + -fx-max-height: 0; + -fx-pref-height: 0; + -fx-min-height: 0; + } + } + .tree-table-row-cell { -fx-background-color: -color-cell-border, -color-cell-bg; -fx-background-insets: 0, 0 0 1 0;