aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src/widgets/table.rs
diff options
context:
space:
mode:
authorKeith Simmons2021-06-25 03:58:15 +0000
committerGitHub2021-06-25 03:58:15 +0000
commit4418e17547562e211952b9e8585916e04b858b3b (patch)
tree8427958809392969b035967c1c69e9507207d00e /helix-tui/src/widgets/table.rs
parent74cc4b4a49e05462b2b543737ad4dc32e2265794 (diff)
reverse the dependency between helix-tui and helix-view (#366)
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view * fix tests * clippy and format fixes Co-authored-by: Keith Simmons <keithsim@microsoft.com>
Diffstat (limited to 'helix-tui/src/widgets/table.rs')
-rw-r--r--helix-tui/src/widgets/table.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs
index d42d7d30..44f6c58f 100644
--- a/helix-tui/src/widgets/table.rs
+++ b/helix-tui/src/widgets/table.rs
@@ -1,7 +1,6 @@
use crate::{
buffer::Buffer,
- layout::{Constraint, Rect},
- style::Style,
+ layout::Constraint,
text::Text,
widgets::{Block, Widget},
};
@@ -10,6 +9,7 @@ use cassowary::{
WeightedRelation::*,
{Expression, Solver},
};
+use helix_view::graphics::{Rect, Style};
use std::{
collections::HashMap,
iter::{self, Iterator},
@@ -21,8 +21,8 @@ use unicode_width::UnicodeWidthStr;
/// It can be created from anything that can be converted to a [`Text`].
/// ```rust
/// # use helix_tui::widgets::Cell;
-/// # use helix_tui::style::{Style, Modifier};
/// # use helix_tui::text::{Span, Spans, Text};
+/// # use helix_view::graphics::{Style, Modifier};
/// Cell::from("simple string");
///
/// Cell::from(Span::from("span"));
@@ -74,7 +74,7 @@ where
/// But if you need a bit more control over individual cells, you can explicity create [`Cell`]s:
/// ```rust
/// # use helix_tui::widgets::{Row, Cell};
-/// # use helix_tui::style::{Style, Color};
+/// # use helix_view::graphics::{Style, Color};
/// Row::new(vec![
/// Cell::from("Cell1"),
/// Cell::from("Cell2").style(Style::default().fg(Color::Yellow)),
@@ -137,7 +137,7 @@ impl<'a> Row<'a> {
/// ```rust
/// # use helix_tui::widgets::{Block, Borders, Table, Row, Cell};
/// # use helix_tui::layout::Constraint;
-/// # use helix_tui::style::{Style, Color, Modifier};
+/// # use helix_view::graphics::{Style, Color, Modifier};
/// # use helix_tui::text::{Text, Spans, Span};
/// Table::new(vec![
/// // Row can be created from simple strings.