Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
37ccf25
Add Top Positioning per monitor
onesounds Jun 4, 2024
63ce735
When using the “remember last position” setting, if the resolution or…
onesounds Jun 4, 2024
c73f4f4
Merge branch 'dpi-per-monitor' into 240605-Fix-RightTop-Position
onesounds Jun 4, 2024
ae0ec8e
Revert "Fix blurry situation when changed dpi in some case"
onesounds Jun 4, 2024
45dd84a
Adjust Code
onesounds Jun 4, 2024
e0cdc92
Revert "Adjust Code"
onesounds Jun 5, 2024
5c6f539
Reapply "Fix blurry situation when changed dpi in some case"
onesounds Jun 5, 2024
4f16a11
Revert "Fix blurry situation when changed dpi in some case"
onesounds Jun 5, 2024
d247208
Revert "When using the “remember last position” setting, if the resol…
onesounds Jun 5, 2024
ab40e7a
Adjust logic
onesounds Jun 5, 2024
5df7362
- Add Logic in settingwindow
onesounds Jun 5, 2024
18be9ac
Merge branch 'dev' into 240605-Fix-RightTop-Position
onesounds Jun 5, 2024
88c6fe3
Adjust Code
onesounds Jun 6, 2024
b54b00a
Merge branch '240605-Fix-RightTop-Position' of https://github.com/one…
onesounds Jun 6, 2024
1bd9e81
Fix app manifest
onesounds Jun 6, 2024
e863d99
Adjust Typo
onesounds Jun 6, 2024
586752f
Merge branch 'dev' into 240605-Fix-RightTop-Position
jjw24 Jun 16, 2024
05cea15
Merge branch 'dev' into 240605-Fix-RightTop-Position
onesounds Jun 19, 2024
ce100c4
refactor code with Point2D.cs
taooceros Jun 19, 2024
7953ad8
Merge remote-tracking branch 'onesounds/240605-Fix-RightTop-Position'…
taooceros Jun 19, 2024
feaf6c4
fix a variable name
taooceros Jun 19, 2024
70a24e0
remove unused intrinsic
taooceros Jun 19, 2024
58caa49
fix logic
taooceros Jun 19, 2024
ffdd190
Merge branch 'dev' into 240605-Fix-RightTop-Position
taooceros Jun 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions Flow.Launcher.Infrastructure/UserSettings/Point2D.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;

namespace Flow.Launcher.Infrastructure.UserSettings;

public record struct Point2D(double X, double Y)
{
public static implicit operator Point2D((double X, double Y) point)
{
return new Point2D(point.X, point.Y);
}

public static Point2D operator +(Point2D point1, Point2D point2)
{
return new Point2D(point1.X + point2.X, point1.Y + point2.Y);
}

public static Point2D operator -(Point2D point1, Point2D point2)
{
return new Point2D(point1.X - point2.X, point1.Y - point2.Y);
}

public static Point2D operator *(Point2D point, double scalar)
{
return new Point2D(point.X * scalar, point.Y * scalar);
}

public static Point2D operator /(Point2D point, double scalar)
{
return new Point2D(point.X / scalar, point.Y / scalar);
}

public static Point2D operator /(Point2D point1, Point2D point2)
{
return new Point2D(point1.X / point2.X, point1.Y / point2.Y);
}

public static Point2D operator *(Point2D point1, Point2D point2)
{
return new Point2D(point1.X * point2.X, point1.Y * point2.Y);
}

public Point2D Clamp(Point2D min, Point2D max)
{
return new Point2D(Math.Clamp(X, min.X, max.X), Math.Clamp(Y, min.Y, max.Y));
}
}
6 changes: 4 additions & 2 deletions Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,10 @@ public SearchPrecisionScore QuerySearchPrecision

public bool AutoUpdates { get; set; } = false;

public double WindowLeft { get; set; }
public double WindowTop { get; set; }

public Point2D WindowPosition { get; set; }
public Point2D PreviousScreen { get; set; }
public Point2D PreviousDpi { get; set; }

/// <summary>
/// Custom left position on selected monitor
Expand Down
Loading