diff --git a/generator/src/config.rs b/generator/src/config.rs index 8fec590..1e347d0 100644 --- a/generator/src/config.rs +++ b/generator/src/config.rs @@ -30,9 +30,9 @@ pub struct TakeSnapshotParams { pub highlight_start_line_number: Option, pub highlight_end_line_number: Option, pub min_width: Option, - pub horizontal_background_padding: f32, - pub vertical_background_padding: f32, - pub background_padding: Option, + pub bg_x_padding: f32, + pub bg_y_padding: f32, + pub bg_padding: Option, } impl FromObject for TakeSnapshotParams { diff --git a/generator/src/snapshot.rs b/generator/src/snapshot.rs index b6aaf27..04402d5 100644 --- a/generator/src/snapshot.rs +++ b/generator/src/snapshot.rs @@ -28,9 +28,9 @@ pub fn take_snapshot(params: TakeSnapshotParams) -> render_error::Result 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 diff --git a/lua/codesnap/static.lua b/lua/codesnap/static.lua index f8c4455..bd86374 100644 --- a/lua/codesnap/static.lua +++ b/lua/codesnap/static.lua @@ -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,