gpt4 book ai didi

css - 使用自定义 CSS 时,JavaFX 表上的滚动条会留下空白

转载 作者:技术小花猫 更新时间:2023-10-29 11:34:52 26 4
gpt4 key购买 nike

一图胜千言:

White space in the corner of the table using custom css.

如您所见,我在此表上使用了自定义 CSS,但无法填充右上角。我尝试更改滚动 Pane 的背景,但没有结果。

这是实际的 CSS:

.table-row-cell {
-fx-background-color: rgba(71, 81, 80,0.5);
}

.table-row-cell:hover {
-fx-background-color: rgba(40, 96, 93, 0.50);
}

.table-row-cell:hover:empty {
-fx-background-color: rgba(71, 81, 80,0.5);
}

.table-row-cell .table-cell {
-fx-border-width: 0px;

}

.table-view {
-fx-border-color: rgba(1, 11, 12, 1);
-fx-background-radius: 2;
-fx-border-width: 1px;
-fx-border-radius: 2;
-fx-background-color: rgba(71, 81, 80,0.2);
-fx-background-insets: 0;
}

.table-view .column-header {
-fx-background-color: rgba(1, 11, 12, 1);
}

.scroll-bar {
-fx-background-color: rgba(1, 11, 12, 1);
}

.scroll-bar .increment-button:hover {
-fx-background-color: rgba(1, 11, 12, 1);
}

.scroll-bar .decrement-button:hover {
-fx-background-color: rgba(1, 11, 12, 1);
}

.scroll-bar .thumb {
-fx-background-color: rgba(71, 81, 80,0.5);
}

任何帮助将不胜感激。

最佳答案

我终于找到了解决方法,感谢@James_D 帮助我找到解决方案。

那个 Angular 不是滚动 Pane 的一部分,而是 table.view 标题的一部分。所以你可以用这段代码改变背景。

填充是必要的,因为如果没有填充,它会在右侧留下一条奇怪的白线。

.table-view .column-header-background .filler {
-fx-background-color: rgba(1, 11, 12, 1);
-fx-padding: 1em;
}

如果您找到更好的方法来实现这一点,欢迎您的回答。

关于css - 使用自定义 CSS 时,JavaFX 表上的滚动条会留下空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23175190/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com