Skip to content

Commit

Permalink
Fix horizontal scrollbar on recipe pane
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPickering committed Sep 23, 2024
1 parent c97904e commit 34f92df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/tui/src/view/component/recipe_pane/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
message::Message,
util::ResultReported,
view::{
common::text_window::{TextWindow, TextWindowProps},
common::text_window::{ScrollbarMargins, TextWindow, TextWindowProps},
component::recipe_pane::{
persistence::{RecipeOverrideKey, RecipeTemplate},
table::{RecipeFieldTable, RecipeFieldTableProps},
Expand Down Expand Up @@ -229,7 +229,10 @@ impl Draw for RawBody {
// Do *not* call generate, because that clones the text and
// we only need a reference
text: &self.body.preview().text(),
margins: Default::default(),
margins: ScrollbarMargins {
right: 1,
bottom: 2, // Extra buffer for edit/reset note
},
footer: if self.body.is_overridden() {
Some("(edited)".set_style(styles.text.hint).into())
} else {
Expand Down

0 comments on commit 34f92df

Please sign in to comment.