mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Remember sticker size
This commit is contained in:
parent
af541e3f8c
commit
4e7b076719
3 changed files with 11 additions and 3 deletions
|
@ -43,8 +43,10 @@ public partial class StickerForm : Form
|
|||
|
||||
private string[] imageFiles;
|
||||
|
||||
public StickerForm()
|
||||
public StickerForm(int imageSize = 64)
|
||||
{
|
||||
ImageSize = imageSize;
|
||||
|
||||
InitializeComponent();
|
||||
Icon = ShareXResources.Icon;
|
||||
tsMain.Renderer = new CustomToolStripProfessionalRenderer();
|
||||
|
@ -52,8 +54,9 @@ public StickerForm()
|
|||
tsnudSize.NumericUpDownControl.Maximum = 256;
|
||||
tsnudSize.NumericUpDownControl.Increment = 16;
|
||||
tsnudSize.NumericUpDownControl.TextAlign = HorizontalAlignment.Center;
|
||||
tsnudSize.NumericUpDownControl.SetValue(ImageSize);
|
||||
ilvStickers.SetRenderer(new StickerImageListViewRenderer());
|
||||
ilvStickers.ThumbnailSize = new Size(64, 64);
|
||||
ilvStickers.ThumbnailSize = new Size(ImageSize, ImageSize);
|
||||
tscbStickers.SelectedIndex = 0;
|
||||
|
||||
LoadImageFiles("blobs");
|
||||
|
|
|
@ -82,6 +82,9 @@ public class AnnotationOptions
|
|||
public int StepFontSize { get; set; } = 18;
|
||||
public bool StepUseLetters { get; set; } = false;
|
||||
|
||||
// Sticker drawing
|
||||
public int StickerSize { get; set; } = 64;
|
||||
|
||||
// Blur effect
|
||||
public int BlurRadius { get; set; } = 15;
|
||||
|
||||
|
|
|
@ -50,10 +50,12 @@ public override void OnCreating()
|
|||
|
||||
try
|
||||
{
|
||||
using (StickerForm stickerForm = new StickerForm())
|
||||
using (StickerForm stickerForm = new StickerForm(AnnotationOptions.StickerSize))
|
||||
{
|
||||
if (stickerForm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
AnnotationOptions.StickerSize = stickerForm.ImageSize;
|
||||
|
||||
if (!string.IsNullOrEmpty(stickerForm.SelectedImageFile))
|
||||
{
|
||||
Image img = ImageHelpers.LoadImage(stickerForm.SelectedImageFile);
|
||||
|
|
Loading…
Reference in a new issue