Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-tui/src/widgets/mod.rs')
-rw-r--r--helix-tui/src/widgets/mod.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/helix-tui/src/widgets/mod.rs b/helix-tui/src/widgets/mod.rs
index 3a0dfc5d..b28a4df7 100644
--- a/helix-tui/src/widgets/mod.rs
+++ b/helix-tui/src/widgets/mod.rs
@@ -23,22 +23,23 @@ pub use self::table::{Cell, Row, Table, TableState};
use crate::buffer::Buffer;
use bitflags::bitflags;
-use helix_view::graphics::Rect;
+use helix_graphics::Rect;
bitflags! {
/// Bitflags that can be composed to set the visible borders essentially on the block widget.
- #[derive(Debug, PartialEq, Eq, Clone, Copy, Default)]
- pub struct Borders: u8 {
+ pub struct Borders: u32 {
+ /// Show no border (default)
+ const NONE = 0b0000_0001;
/// Show the top border
- const TOP = 0b0000_0001;
+ const TOP = 0b0000_0010;
/// Show the right border
- const RIGHT = 0b0000_0010;
+ const RIGHT = 0b0000_0100;
/// Show the bottom border
- const BOTTOM = 0b000_0100;
+ const BOTTOM = 0b000_1000;
/// Show the left border
- const LEFT = 0b0000_1000;
+ const LEFT = 0b0001_0000;
/// Show all borders
- const ALL = Self::TOP.bits() | Self::RIGHT.bits() | Self::BOTTOM.bits() | Self::LEFT.bits();
+ const ALL = Self::TOP.bits | Self::RIGHT.bits | Self::BOTTOM.bits | Self::LEFT.bits;
}
}