aboutsummaryrefslogtreecommitdiff
path: root/src/table.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/table.rs')
-rw-r--r--src/table.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/table.rs b/src/table.rs
new file mode 100644
index 0000000..c5c6e5d
--- /dev/null
+++ b/src/table.rs
@@ -0,0 +1,25 @@
+use iced_widget::core::Background;
+use iced_widget::table::{Catalog, Style, StyleFn};
+
+use super::Theme;
+
+impl Catalog for Theme {
+ type Class<'a> = StyleFn<'a, Self>;
+
+ fn default<'a>() -> Self::Class<'a> {
+ Box::new(default)
+ }
+
+ fn style(&self, class: &Self::Class<'_>) -> Style {
+ class(self)
+ }
+}
+
+pub fn default(theme: &Theme) -> Style {
+ let separator = theme.colors().outline.variant;
+
+ Style {
+ separator_x: Background::Color(separator),
+ separator_y: Background::Color(separator),
+ }
+}