Skip to content

Commit

Permalink
[Update] rename config items which related background config
Browse files Browse the repository at this point in the history
  • Loading branch information
mistricky committed Jul 4, 2024
1 parent 5ca67ad commit de9e855
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions generator/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ pub struct TakeSnapshotParams {
pub highlight_start_line_number: Option<usize>,
pub highlight_end_line_number: Option<usize>,
pub min_width: Option<f32>,
pub horizontal_background_padding: f32,
pub vertical_background_padding: f32,
pub background_padding: Option<f32>,
pub bg_x_padding: f32,
pub bg_y_padding: f32,
pub bg_padding: Option<f32>,
}

impl FromObject for TakeSnapshotParams {
Expand Down
6 changes: 3 additions & 3 deletions generator/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ pub fn take_snapshot(params: TakeSnapshotParams) -> render_error::Result<Pixmap>
take_snapshot_params: Arc::new(params.clone()),
};
let background_padding = Background::parse_background_padding(
params.horizontal_background_padding,
params.vertical_background_padding,
params.background_padding,
params.bg_x_padding,
params.bg_y_padding,
params.bg_padding,
);

// If vertical background padding is less than 82., should hidden watermark component
Expand Down
4 changes: 2 additions & 2 deletions lua/codesnap/static.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ return {
has_line_number = false,
show_workspace = false,
min_width = 0,
horizontal_background_padding = 122,
vertical_background_padding = 82,
bg_x_padding = 122,
bg_y_padding = 82,
},
cwd = path_utils.back(path_utils.back(debug.getinfo(1, "S").source:sub(2):match("(.*[/\\])"))),
preview_switch = true,
Expand Down

0 comments on commit de9e855

Please sign in to comment.