Testing a Merge fix

This commit is contained in:
Eric Vasquez
2024-11-10 18:24:17 -06:00
parent 63fe0846aa
commit 1eafad0159
37 changed files with 1605 additions and 2013 deletions

View File

@@ -89,6 +89,7 @@ namespace EveOPreview.View
{
this.Text = value;
this._overlay.SetOverlayLabel(value.Replace("EVE - ", ""));
this._overlay.SetPropertiesOverlayLabel(_config.OverlayLabelSize, _config.OverlayLabelColor, _config.OverlayLabelAnchor);
SetDefaultBorderColor();
}
}
@@ -125,6 +126,8 @@ namespace EveOPreview.View
public Action<IntPtr, bool> ThumbnailDeactivated { get; set; }
private bool WindowMoved = false;
public void SetDefaultBorderColor()
{
this._myBorderColor = new Lazy<Color>(() =>
@@ -231,6 +234,9 @@ namespace EveOPreview.View
this.FormBorderStyle = style;
}
public void SetOverlayLabel()
{
}
public void SetTopMost(bool enableTopmost)
{
@@ -436,6 +442,9 @@ namespace EveOPreview.View
this._isLocationChanged = false;
this._overlay.Size = overlaySize;
this._overlay.SetPropertiesOverlayLabel(_config.OverlayLabelSize, _config.OverlayLabelColor, _config.OverlayLabelAnchor);
this._overlay.Location = overlayLocation;
this._overlay.Refresh();
}
@@ -507,6 +516,18 @@ namespace EveOPreview.View
if (e.Button == MouseButtons.Right)
{
this.ExitCustomMouseMode();
// Snap to Grid on release of mouse (if moved)
if (_config.ThumbnailSnapToGrid && this.WindowMoved)
{
var x = (int)Math.Round((double)this.Location.X / (double)_config.ThumbnailSnapToGridSizeX) * _config.ThumbnailSnapToGridSizeX;
var y = (int)Math.Round((double)this.Location.Y / (double)_config.ThumbnailSnapToGridSizeY) * _config.ThumbnailSnapToGridSizeY;
this.Location = new Point(x, y);
this._baseZoomLocation = this.Location;
this.WindowMoved = false;
}
}
}
@@ -555,18 +576,22 @@ namespace EveOPreview.View
int offsetY = mousePosition.Y - this._baseMousePosition.Y;
this._baseMousePosition = mousePosition;
// Left + Right buttons trigger thumbnail resize
// Right button only trigger thumbnail movement
if (leftButton && rightButton)
if (!_config.LockThumbnailLocation)
{
this.Size = new Size(this.Size.Width + offsetX, this.Size.Height + offsetY);
this._baseZoomSize = this.Size;
}
else
{
this.Location = new Point(this.Location.X + offsetX, this.Location.Y + offsetY);
this._baseZoomLocation = this.Location;
}
// Left + Right buttons trigger thumbnail resize
// Right button only trigger thumbnail movement
if (leftButton && rightButton)
{
this.Size = new Size(this.Size.Width + offsetX, this.Size.Height + offsetY);
this._baseZoomSize = this.Size;
}
else
{
this.Location = new Point(this.Location.X + offsetX, this.Location.Y + offsetY);
this._baseZoomLocation = this.Location;
this.WindowMoved = true;
}
}
}
private void ExitCustomMouseMode()