Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/components/utils/scroll_vertical.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
components::ScrollType,
ui::{draw_scrollbar, style::SharedTheme, Orientation},
use crate::{components::ScrollType, ui::style::SharedTheme};
use ratatui::widgets::{
Scrollbar, ScrollbarOrientation, ScrollbarState,
};
use ratatui::{layout::Rect, Frame};
use std::cell::Cell;
Expand Down Expand Up @@ -107,15 +107,15 @@ impl VerticalScroll {
self.update(self.get_top(), line_count, visual_height)
}

pub fn draw(&self, f: &mut Frame, r: Rect, theme: &SharedTheme) {
draw_scrollbar(
f,
r,
theme,
self.max_top.get(),
self.top.get(),
Orientation::Vertical,
);
pub fn draw(&self, f: &mut Frame, r: Rect, _theme: &SharedTheme) {
let scrollbar =
Scrollbar::new(ScrollbarOrientation::VerticalRight);

let mut scrollbar_state =
ScrollbarState::new(self.max_top.get())
.position(self.top.get());

f.render_stateful_widget(scrollbar, r, &mut scrollbar_state);
}
}

Expand Down