Skip to content

Commit

Permalink
fix: rename windows controls in config
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Jan 29, 2024
1 parent 2c64716 commit d01d94e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions crates/sss_lib/src/img.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,25 @@ pub fn generate_image(settings: GenerationSettings, content: impl DynImageConten
);
}

if settings.copy {
let mut c = arboard::Clipboard::new().unwrap();

c.set()
.clipboard(arboard::LinuxClipboardKind::Clipboard)
.wait()
.image(arboard::ImageData {
width: img.width() as usize,
height: img.height() as usize,
bytes: img.to_vec().into(),
})
.unwrap();
} else {
// if settings.copy {
// let mut c = arboard::Clipboard::new().unwrap();

// c.set()
// .clipboard(arboard::LinuxClipboardKind::Clipboard)
// .wait()
// .image(arboard::ImageData {
// width: img.width() as usize,
// height: img.height() as usize,
// bytes: img.to_vec().into(),
// })
// .unwrap();
// } else {
img.save_with_format(
&settings.output,
str_to_format(settings.save_format.unwrap_or("png".to_string())).unwrap(),
)
.unwrap();
}
// }
}

impl TryFrom<String> for Background {
Expand Down

0 comments on commit d01d94e

Please sign in to comment.