1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2026-01-01 02:03:32 +00:00

UI - Fixed tray icon tooltip positioning

This commit is contained in:
Robert 2021-02-24 20:30:17 +01:00
parent e3b9a88cc7
commit 8795500991
3 changed files with 32 additions and 22 deletions

View File

@ -138,7 +138,7 @@
<PackageReference Include="FluentValidation" Version="9.3.0" /> <PackageReference Include="FluentValidation" Version="9.3.0" />
<PackageReference Include="Flurl.Http" Version="3.0.1" /> <PackageReference Include="Flurl.Http" Version="3.0.1" />
<PackageReference Include="gong-wpf-dragdrop" Version="2.3.2" /> <PackageReference Include="gong-wpf-dragdrop" Version="2.3.2" />
<PackageReference Include="Hardcodet.NotifyIcon.Wpf.NetCore" Version="1.0.14" /> <PackageReference Include="Hardcodet.NotifyIcon.Wpf.NetCore" Version="1.0.18" />
<PackageReference Include="Humanizer.Core" Version="2.8.26" /> <PackageReference Include="Humanizer.Core" Version="2.8.26" />
<PackageReference Include="MaterialDesignExtensions" Version="3.3.0-a01" /> <PackageReference Include="MaterialDesignExtensions" Version="3.3.0-a01" />
<PackageReference Include="MaterialDesignThemes" Version="3.2.0" /> <PackageReference Include="MaterialDesignThemes" Version="3.2.0" />

View File

@ -1,24 +1,25 @@
<controls:MaterialWindow x:Class="Artemis.UI.Screens.TrayView" <Window x:Class="Artemis.UI.Screens.TrayView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:s="https://github.com/canton7/Stylet" xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:controls="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions" mc:Ignorable="d">
mc:Ignorable="d" <tb:TaskbarIcon IconSource="/Resources/Images/Logo/logo-512.ico"
Title="Artemis"
Height="1"
Width="1"
Visibility="Hidden">
<tb:TaskbarIcon x:Name="TrayIcon"
IconSource="/Resources/Images/Logo/logo-512.ico"
MenuActivation="LeftOrRightClick" MenuActivation="LeftOrRightClick"
PopupActivation="DoubleClick" PopupActivation="DoubleClick"
ToolTipText="Artemis"
DoubleClickCommand="{s:Action TrayBringToForeground}" DoubleClickCommand="{s:Action TrayBringToForeground}"
TrayBalloonTipClicked="{s:Action OnTrayBalloonTipClicked}"> TrayBalloonTipClicked="{s:Action OnTrayBalloonTipClicked}">
<tb:TaskbarIcon.TrayToolTip>
<Border Background="{DynamicResource MaterialDesignToolTipBackground}" CornerRadius="2" Padding="5">
<TextBlock Foreground="{DynamicResource MaterialDesignPaper}">
Artemis
</TextBlock>
</Border>
</tb:TaskbarIcon.TrayToolTip>
<tb:TaskbarIcon.ContextMenu> <tb:TaskbarIcon.ContextMenu>
<ContextMenu> <ContextMenu>
<MenuItem Header="Home" Command="{s:Action TrayActivateSidebarItem}" CommandParameter="Home"> <MenuItem Header="Home" Command="{s:Action TrayActivateSidebarItem}" CommandParameter="Home">
@ -60,4 +61,4 @@
</ContextMenu> </ContextMenu>
</tb:TaskbarIcon.ContextMenu> </tb:TaskbarIcon.ContextMenu>
</tb:TaskbarIcon> </tb:TaskbarIcon>
</controls:MaterialWindow> </Window>

View File

@ -27,9 +27,13 @@
}, },
"Hardcodet.NotifyIcon.Wpf.NetCore": { "Hardcodet.NotifyIcon.Wpf.NetCore": {
"type": "Direct", "type": "Direct",
"requested": "[1.0.14, )", "requested": "[1.0.18, )",
"resolved": "1.0.14", "resolved": "1.0.18",
"contentHash": "aNwwax4+C/xhIxTbwKHJnxh0A6hWGnqXZtppZ+/lkE8VOL+a2WuMOBgWpkiUk6Tv+pi1bc+yuHo0lh4Md6KEFw==" "contentHash": "oI8YY/gUQooA0XIIZl4TgueexJcu+MbSvCQ2+ZBZRa+rIvFCWiyk8rjgywQ17sVrhLXRn+xF8+FTrWLxetkx0A==",
"dependencies": {
"H.NotifyIcon": "1.0.18",
"System.Drawing.Common": "5.0.0"
}
}, },
"Humanizer.Core": { "Humanizer.Core": {
"type": "Direct", "type": "Direct",
@ -225,6 +229,11 @@
"resolved": "3.0.1", "resolved": "3.0.1",
"contentHash": "i7CuPSikVroBaWG8sPvO707Ex9C6BP5+r4JufKNU1FGMmiFgLJvNo1ttUg6ZiXIzUNknvIb1VUTIO9iEDucibg==" "contentHash": "i7CuPSikVroBaWG8sPvO707Ex9C6BP5+r4JufKNU1FGMmiFgLJvNo1ttUg6ZiXIzUNknvIb1VUTIO9iEDucibg=="
}, },
"H.NotifyIcon": {
"type": "Transitive",
"resolved": "1.0.18",
"contentHash": "vV0lNWD9xGeCH4pCmT8vKtax2QOmo8WwhCBgBDO3BYQtPG7Rjuf5Ua+3O8++XkZB7t9zromzxcT5nYdGDg1Puw=="
},
"HidSharp": { "HidSharp": {
"type": "Transitive", "type": "Transitive",
"resolved": "2.1.0", "resolved": "2.1.0",