Skip to content

Commit a38f95e

Browse files
authored
fix scrollbar (#32)
1 parent b5783d1 commit a38f95e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

crates/egui-term/src/view.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ impl Widget for TerminalView<'_> {
6464
let widget_id = self.widget_id;
6565
let mut state = TerminalViewState::load(ui.ctx(), widget_id);
6666

67-
let size_p = Vec2::new(self.size.x - InteractiveScrollbar::WIDTH, self.size.y);
68-
let (layout, painter) = ui.allocate_painter(size_p, egui::Sense::click());
69-
7067
ui.horizontal(|ui| {
68+
let size_p = Vec2::new(self.size.x - InteractiveScrollbar::WIDTH, self.size.y);
69+
let (layout, painter) = ui.allocate_painter(size_p, egui::Sense::click());
70+
7171
if layout.contains_pointer() {
7272
*self.options.active_tab_id = Some(self.widget_id);
7373
layout.ctx.set_cursor_icon(CursorIcon::Text);
@@ -119,8 +119,9 @@ impl Widget for TerminalView<'_> {
119119
term.show(&mut state, &layout, &painter);
120120

121121
state.store(ui.ctx(), widget_id);
122-
});
123-
layout
122+
layout
123+
})
124+
.inner
124125
}
125126
}
126127

0 commit comments

Comments
 (0)