Skip to content

Commit 62578d0

Browse files
committed
bump ratatui version
1 parent 20259af commit 62578d0

9 files changed

+256
-243
lines changed

Cargo.lock

+235-222
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ repository = "https://github.com/pythops/impala"
1111

1212
[dependencies]
1313
async-channel = "2"
14-
crossterm = { version = "0.27", default-features = false, features = [
14+
crossterm = { version = "0.28", default-features = false, features = [
1515
"event-stream",
1616
] }
17-
ratatui = "0.27"
18-
tui-input = "0.8"
17+
ratatui = "0.28"
18+
tui-input = "0.10"
1919
tokio = { version = "1", features = ["full"] }
2020
futures = "0.3"
2121
dirs = "5"

src/access_point.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ impl AccessPoint {
100100
]
101101
.as_ref(),
102102
)
103-
.split(frame.size());
103+
.split(frame.area());
104104

105105
let area = Layout::default()
106106
.direction(Direction::Horizontal)
107107
.constraints(
108108
[
109-
Constraint::Length((frame.size().width - 80) / 2),
109+
Constraint::Length((frame.area().width - 80) / 2),
110110
Constraint::Min(80),
111-
Constraint::Length((frame.size().width - 80) / 2),
111+
Constraint::Length((frame.area().width - 80) / 2),
112112
]
113113
.as_ref(),
114114
)

src/adapter.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl Adapter {
8686
.direction(Direction::Vertical)
8787
.constraints([Constraint::Fill(1)])
8888
.margin(1)
89-
.split(frame.size());
89+
.split(frame.area());
9090
chunks[0]
9191
};
9292

@@ -203,7 +203,7 @@ impl Adapter {
203203
]
204204
})
205205
.margin(1)
206-
.split(frame.size());
206+
.split(frame.area());
207207
(chunks[0], chunks[1], chunks[2])
208208
};
209209

@@ -519,7 +519,7 @@ impl Adapter {
519519
Constraint::Percentage(34),
520520
])
521521
.margin(1)
522-
.split(frame.size());
522+
.split(frame.area());
523523
(chunks[0], chunks[1], chunks[2], chunks[3])
524524
};
525525

@@ -1044,15 +1044,15 @@ impl Adapter {
10441044
]
10451045
.as_ref(),
10461046
)
1047-
.split(frame.size());
1047+
.split(frame.area());
10481048

10491049
let area = Layout::default()
10501050
.direction(Direction::Horizontal)
10511051
.constraints(
10521052
[
1053-
Constraint::Length((frame.size().width - 80) / 2),
1053+
Constraint::Length((frame.area().width - 80) / 2),
10541054
Constraint::Min(80),
1055-
Constraint::Length((frame.size().width - 80) / 2),
1055+
Constraint::Length((frame.area().width - 80) / 2),
10561056
]
10571057
.as_ref(),
10581058
)

src/app.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ impl App {
185185
]
186186
.as_ref(),
187187
)
188-
.split(frame.size());
188+
.split(frame.area());
189189

190190
let area = Layout::default()
191191
.direction(Direction::Horizontal)
192192
.constraints(
193193
[
194-
Constraint::Length((frame.size().width - 50) / 2),
194+
Constraint::Length((frame.area().width - 50) / 2),
195195
Constraint::Min(50),
196-
Constraint::Length((frame.size().width - 50) / 2),
196+
Constraint::Length((frame.area().width - 50) / 2),
197197
]
198198
.as_ref(),
199199
)

src/auth.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ impl Auth {
1919
]
2020
.as_ref(),
2121
)
22-
.split(frame.size());
22+
.split(frame.area());
2323

2424
let area = Layout::default()
2525
.direction(Direction::Horizontal)
2626
.constraints(
2727
[
28-
Constraint::Length((frame.size().width - 80) / 2),
28+
Constraint::Length((frame.area().width - 80) / 2),
2929
Constraint::Min(80),
30-
Constraint::Length((frame.size().width - 80) / 2),
30+
Constraint::Length((frame.area().width - 80) / 2),
3131
]
3232
.as_ref(),
3333
)

src/help.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl Help {
133133
}
134134

135135
pub fn render(&mut self, frame: &mut Frame, color_mode: ColorMode) {
136-
let block = help_rect(frame.size());
136+
let block = help_rect(frame.area());
137137

138138
self.block_height = block.height as usize;
139139
let widths = [Constraint::Length(20), Constraint::Fill(1)];

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async fn main() -> AppResult<()> {
2828
App::reset(mode.clone()).await?;
2929
let mut app = App::new(help.clone(), mode).await?;
3030

31-
let backend = CrosstermBackend::new(io::stderr());
31+
let backend = CrosstermBackend::new(io::stdout());
3232
let terminal = Terminal::new(backend)?;
3333
let events = EventHandler::new(500);
3434
let mut tui = Tui::new(terminal, events);

src/notification.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl Notification {
5555
index as u16,
5656
notification_height,
5757
notification_width,
58-
frame.size(),
58+
frame.area(),
5959
);
6060

6161
frame.render_widget(Clear, area);

0 commit comments

Comments
 (0)