mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Fix bug introduced in 7c2e2a01c2 by @aaroncampf
This commit is contained in:
@@ -23,9 +23,10 @@
|
|||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="32" />
|
<ColumnDefinition Width="32" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition Width="16" />
|
<ColumnDefinition Width="2.852" />
|
||||||
|
<ColumnDefinition Width="13.148"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image x:Name="imgIco" Width="32" Height="32" HorizontalAlignment="Left" />
|
<Image x:Name="imgIco" Width="32" Height="32" HorizontalAlignment="Left" Margin="0,9" />
|
||||||
<Grid HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1" VerticalAlignment="Stretch">
|
<Grid HorizontalAlignment="Stretch" Margin="5 0 0 0" Grid.Column="1" VerticalAlignment="Stretch">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
@@ -35,6 +36,6 @@
|
|||||||
<TextBlock Grid.Row="1" Foreground="#8e94a4" x:Name="tbSubTitle">sdfdsf</TextBlock>
|
<TextBlock Grid.Row="1" Foreground="#8e94a4" x:Name="tbSubTitle">sdfdsf</TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Image x:Name="imgClose" Grid.Column="2" Cursor="Hand" Width="16" VerticalAlignment="Top"
|
<Image x:Name="imgClose" Grid.Column="2" Cursor="Hand" Width="16" VerticalAlignment="Top"
|
||||||
HorizontalAlignment="Right" />
|
HorizontalAlignment="Right" Grid.ColumnSpan="2" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
@@ -6,6 +6,7 @@ using System.Windows.Input;
|
|||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using Wox.Helper;
|
using Wox.Helper;
|
||||||
|
using Wox.Infrastructure;
|
||||||
|
|
||||||
namespace Wox
|
namespace Wox
|
||||||
{
|
{
|
||||||
@@ -36,9 +37,7 @@ namespace Wox
|
|||||||
Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty));
|
Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty));
|
||||||
fadeOutStoryboard.Children.Add(fadeOutAnimation);
|
fadeOutStoryboard.Children.Add(fadeOutAnimation);
|
||||||
|
|
||||||
|
imgClose.Source = App.ImageLoader.Load(Path.Combine(WoxDirectroy.Executable, "Images\\close.png"));
|
||||||
imgClose.Source = new BitmapImage(new Uri("Images\\close.pn", UriKind.Relative));
|
|
||||||
//imgClose.Source = new BitmapImage(new Uri(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "Images\\close.png")));
|
|
||||||
imgClose.MouseUp += imgClose_MouseUp;
|
imgClose.MouseUp += imgClose_MouseUp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +55,7 @@ namespace Wox
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Show(string title, string subTitle, string icopath)
|
public void Show(string title, string subTitle, string iconPath)
|
||||||
{
|
{
|
||||||
tbTitle.Text = title;
|
tbTitle.Text = title;
|
||||||
tbSubTitle.Text = subTitle;
|
tbSubTitle.Text = subTitle;
|
||||||
@@ -64,12 +63,12 @@ namespace Wox
|
|||||||
{
|
{
|
||||||
tbSubTitle.Visibility = Visibility.Collapsed;
|
tbSubTitle.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
if (!File.Exists(icopath))
|
if (!File.Exists(iconPath))
|
||||||
{
|
{
|
||||||
imgIco.Source = new BitmapImage(new Uri("Images\\app.png", UriKind.Relative));
|
imgIco.Source = App.ImageLoader.Load(Path.Combine(WoxDirectroy.Executable, "Images\\app.png"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
imgIco.Source = new BitmapImage(new Uri(icopath));
|
imgIco.Source = App.ImageLoader.Load(iconPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
Show();
|
Show();
|
||||||
|
|||||||
Reference in New Issue
Block a user