mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-26 12:09:32 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c13426781 | ||
|
|
67ec02af0c |
@@ -3,7 +3,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
Width="180" Height="400"
|
||||
Width="180"
|
||||
x:Class="System.Application.UI.Views.Windows.TaskBarWindow"
|
||||
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
xmlns:service="clr-namespace:System.Application.Services;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
|
||||
@@ -49,17 +49,21 @@ namespace System.Application.UI.Views.Windows
|
||||
//{
|
||||
// this.Position = new PixelPoint(vm.SizePosition.X, vm.SizePosition.Y - (int)this.Height);
|
||||
//}
|
||||
var workingAreaWidth = this.Screens.Primary.WorkingArea.Width;
|
||||
|
||||
vm.WhenAnyValue(x => x.SizePosition.X, x => x.SizePosition.Y)
|
||||
.Subscribe(x =>
|
||||
{
|
||||
var screen = this.Screens.ScreenFromPoint(new PixelPoint(x.Item1, x.Item2));
|
||||
var workingAreaWidth = screen.WorkingArea.Width;
|
||||
|
||||
if ((x.Item1 + (int)this.Width + 30) > workingAreaWidth)
|
||||
{
|
||||
this.Position = new PixelPoint(x.Item1 - (int)this.Width, x.Item2 - (int)this.Height);
|
||||
this.Position = new PixelPoint(x.Item1 - (int)(this.Width * screen.PixelDensity), x.Item2 - (int)(this.Height * screen.PixelDensity));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Position = new PixelPoint(x.Item1, x.Item2 - (int)this.Height);
|
||||
this.Position = new PixelPoint(x.Item1, x.Item2 - (int)(this.Height * screen.PixelDensity));
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace System.Application.UI
|
||||
JumpList jumpList1 = JumpList.GetJumpList(AvaloniaApplication.Current);
|
||||
if (jumpList1 != null)
|
||||
{
|
||||
var tk = jumpList1.JumpItems.FirstOrDefault(s => s is JumpTask t && t.Arguments == task.Arguments);
|
||||
var tk = jumpList1.JumpItems.FirstOrDefault(s => s is JumpTask t && t.ApplicationPath == task.ApplicationPath && t.Arguments == task.Arguments);
|
||||
if (tk != null)
|
||||
{
|
||||
jumpList1.JumpItems.Remove(tk);
|
||||
|
||||
Reference in New Issue
Block a user