feat(MainForm): auto-set thumbnail size to match picked region

This commit is contained in:
2025-08-29 22:23:06 +02:00
parent 418ae9352d
commit a975fbf03d
2 changed files with 17 additions and 13 deletions

View File

@@ -458,7 +458,7 @@ namespace EveOPreview.View {
// RegionTopLabel
//
RegionTopLabel.AutoSize = true;
RegionTopLabel.Location = new Point(183, 308);
RegionTopLabel.Location = new Point(183, 310);
RegionTopLabel.Margin = new Padding(5, 0, 5, 0);
RegionTopLabel.Name = "RegionTopLabel";
RegionTopLabel.Size = new Size(42, 25);
@@ -471,7 +471,7 @@ namespace EveOPreview.View {
RegionTopNumericEdit.BorderStyle = BorderStyle.FixedSingle;
RegionTopNumericEdit.CausesValidation = false;
RegionTopNumericEdit.Increment = new decimal(new int[] { 10, 0, 0, 0 });
RegionTopNumericEdit.Location = new Point(230, 305);
RegionTopNumericEdit.Location = new Point(230, 307);
RegionTopNumericEdit.Margin = new Padding(5, 6, 5, 6);
RegionTopNumericEdit.Maximum = new decimal(new int[] { 999999, 0, 0, 0 });
RegionTopNumericEdit.Name = "RegionTopNumericEdit";
@@ -506,7 +506,7 @@ namespace EveOPreview.View {
// RegionHeightLabel
//
RegionHeightLabel.AutoSize = true;
RegionHeightLabel.Location = new Point(183, 348);
RegionHeightLabel.Location = new Point(183, 350);
RegionHeightLabel.Margin = new Padding(5, 0, 5, 0);
RegionHeightLabel.Name = "RegionHeightLabel";
RegionHeightLabel.Size = new Size(70, 25);
@@ -519,7 +519,7 @@ namespace EveOPreview.View {
RegionHeightNumericEdit.BorderStyle = BorderStyle.FixedSingle;
RegionHeightNumericEdit.CausesValidation = false;
RegionHeightNumericEdit.Increment = new decimal(new int[] { 10, 0, 0, 0 });
RegionHeightNumericEdit.Location = new Point(230, 345);
RegionHeightNumericEdit.Location = new Point(230, 347);
RegionHeightNumericEdit.Margin = new Padding(5, 6, 5, 6);
RegionHeightNumericEdit.Maximum = new decimal(new int[] { 999999, 0, 0, 0 });
RegionHeightNumericEdit.Name = "RegionHeightNumericEdit";
@@ -541,7 +541,7 @@ namespace EveOPreview.View {
// ProfileLabel
//
ProfileLabel.AutoSize = true;
ProfileLabel.Location = new Point(13, 270);
ProfileLabel.Location = new Point(13, 430);
ProfileLabel.Margin = new Padding(5, 0, 5, 0);
ProfileLabel.Name = "ProfileLabel";
ProfileLabel.Size = new Size(55, 25);
@@ -551,7 +551,7 @@ namespace EveOPreview.View {
// ProfileComboBox
//
ProfileComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
ProfileComboBox.Location = new Point(93, 265);
ProfileComboBox.Location = new Point(93, 425);
ProfileComboBox.Margin = new Padding(5, 6, 5, 6);
ProfileComboBox.Name = "ProfileComboBox";
ProfileComboBox.Size = new Size(150, 33);
@@ -560,7 +560,7 @@ namespace EveOPreview.View {
//
// SaveProfileButton
//
SaveProfileButton.Location = new Point(260, 265);
SaveProfileButton.Location = new Point(260, 425);
SaveProfileButton.Margin = new Padding(5, 6, 5, 6);
SaveProfileButton.Name = "SaveProfileButton";
SaveProfileButton.Size = new Size(80, 35);
@@ -571,7 +571,7 @@ namespace EveOPreview.View {
//
// DeleteProfileButton
//
DeleteProfileButton.Location = new Point(360, 265);
DeleteProfileButton.Location = new Point(360, 425);
DeleteProfileButton.Margin = new Padding(5, 6, 5, 6);
DeleteProfileButton.Name = "DeleteProfileButton";
DeleteProfileButton.Size = new Size(80, 35);
@@ -583,7 +583,7 @@ namespace EveOPreview.View {
// ThumbnailSnapToGridCheckBox
//
ThumbnailSnapToGridCheckBox.AutoSize = true;
ThumbnailSnapToGridCheckBox.Location = new Point(18, 320);
ThumbnailSnapToGridCheckBox.Location = new Point(18, 200);
ThumbnailSnapToGridCheckBox.Margin = new Padding(5, 6, 5, 6);
ThumbnailSnapToGridCheckBox.Name = "ThumbnailSnapToGridCheckBox";
ThumbnailSnapToGridCheckBox.Size = new Size(226, 29);
@@ -598,7 +598,7 @@ namespace EveOPreview.View {
ThumbnailSnapToGridSizeYNumericEdit.BorderStyle = BorderStyle.FixedSingle;
ThumbnailSnapToGridSizeYNumericEdit.CausesValidation = false;
ThumbnailSnapToGridSizeYNumericEdit.Increment = new decimal(new int[] { 10, 0, 0, 0 });
ThumbnailSnapToGridSizeYNumericEdit.Location = new Point(217, 355);
ThumbnailSnapToGridSizeYNumericEdit.Location = new Point(217, 235);
ThumbnailSnapToGridSizeYNumericEdit.Margin = new Padding(5, 6, 5, 6);
ThumbnailSnapToGridSizeYNumericEdit.Maximum = new decimal(new int[] { 999999, 0, 0, 0 });
ThumbnailSnapToGridSizeYNumericEdit.Name = "ThumbnailSnapToGridSizeYNumericEdit";
@@ -610,7 +610,7 @@ namespace EveOPreview.View {
// SnapYLabel
//
SnapYLabel.AutoSize = true;
SnapYLabel.Location = new Point(183, 358);
SnapYLabel.Location = new Point(183, 238);
SnapYLabel.Margin = new Padding(5, 0, 5, 0);
SnapYLabel.Name = "SnapYLabel";
SnapYLabel.Size = new Size(22, 25);
@@ -623,7 +623,7 @@ namespace EveOPreview.View {
ThumbnailSnapToGridSizeXNumericEdit.BorderStyle = BorderStyle.FixedSingle;
ThumbnailSnapToGridSizeXNumericEdit.CausesValidation = false;
ThumbnailSnapToGridSizeXNumericEdit.Increment = new decimal(new int[] { 10, 0, 0, 0 });
ThumbnailSnapToGridSizeXNumericEdit.Location = new Point(93, 355);
ThumbnailSnapToGridSizeXNumericEdit.Location = new Point(93, 235);
ThumbnailSnapToGridSizeXNumericEdit.Margin = new Padding(5, 6, 5, 6);
ThumbnailSnapToGridSizeXNumericEdit.Maximum = new decimal(new int[] { 999999, 0, 0, 0 });
ThumbnailSnapToGridSizeXNumericEdit.Name = "ThumbnailSnapToGridSizeXNumericEdit";
@@ -635,7 +635,7 @@ namespace EveOPreview.View {
// SnapXLabel
//
SnapXLabel.AutoSize = true;
SnapXLabel.Location = new Point(13, 358);
SnapXLabel.Location = new Point(13, 238);
SnapXLabel.Margin = new Padding(5, 0, 5, 0);
SnapXLabel.Name = "SnapXLabel";
SnapXLabel.Size = new Size(68, 25);

View File

@@ -269,6 +269,10 @@ namespace EveOPreview.View {
if (picker.ShowDialog() == DialogResult.OK) {
var region = picker.SelectedRegion;
this.DefaultThumbnailRegion = region;
// Auto-set the thumbnail width and height to match the picked region
this.ThumbnailSize = new Size(region.Width, region.Height);
this.ApplicationSettingsChanged?.Invoke();
}
}