mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Adjust MessageBox Window
This commit is contained in:
parent
1560991d46
commit
e2450cf29e
4 changed files with 29 additions and 19 deletions
|
|
@ -348,6 +348,9 @@
|
|||
<system:String x:Key="commonCancel">Cancel</system:String>
|
||||
<system:String x:Key="commonReset">Reset</system:String>
|
||||
<system:String x:Key="commonDelete">Delete</system:String>
|
||||
<system:String x:Key="commonOK">OK</system:String>
|
||||
<system:String x:Key="commonYes">Yes</system:String>
|
||||
<system:String x:Key="commonNo">No</system:String>
|
||||
|
||||
<!-- Crash Reporter -->
|
||||
<system:String x:Key="reportWindow_version">Version</system:String>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
x:Name="MessageBoxWindow"
|
||||
Width="420"
|
||||
Height="Auto"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
ResizeMode="NoResize"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
|
|
@ -61,8 +63,8 @@
|
|||
</Grid>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Margin="0,0,0,24">
|
||||
<Grid Grid.Column="0" Margin="0,0,0,12">
|
||||
<StackPanel Grid.Row="1" Margin="30 0 30 24">
|
||||
<Grid Grid.Column="0" Margin="0 0 0 12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
|
|
@ -72,9 +74,9 @@
|
|||
Grid.Column="0"
|
||||
Width="18"
|
||||
Height="18"
|
||||
Margin="30,10,0,0"
|
||||
Margin="0 0 0 0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
VerticalAlignment="Center"
|
||||
RenderOptions.BitmapScalingMode="Fant"
|
||||
Stretch="UniformToFill"
|
||||
Visibility="Collapsed" />
|
||||
|
|
@ -82,7 +84,8 @@
|
|||
x:Name="TitleTextBlock"
|
||||
Grid.Column="1"
|
||||
MaxWidth="400"
|
||||
Margin="26,0,26,0"
|
||||
Margin="10 0 26 0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="Segoe UI"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
|
|
@ -93,7 +96,7 @@
|
|||
x:Name="DescTextBlock"
|
||||
Grid.Column="1"
|
||||
MaxWidth="400"
|
||||
Margin="26,0,26,0"
|
||||
Margin="0 0 26 0"
|
||||
HorizontalAlignment="Stretch"
|
||||
FontSize="14"
|
||||
TextAlignment="Left"
|
||||
|
|
@ -101,10 +104,10 @@
|
|||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Margin="0,0,0,0"
|
||||
Margin="0 0 0 0"
|
||||
Background="{DynamicResource PopupButtonAreaBGColor}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0">
|
||||
BorderThickness="0 1 0 0">
|
||||
<WrapPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
|
|
@ -112,27 +115,27 @@
|
|||
<Button
|
||||
x:Name="btnCancel"
|
||||
MinWidth="140"
|
||||
Margin="5,0,5,0"
|
||||
Margin="5 0 5 0"
|
||||
Click="Button_Click"
|
||||
Content="{DynamicResource cancel}" />
|
||||
Content="{DynamicResource commonCancel}" />
|
||||
<Button
|
||||
x:Name="btnNo"
|
||||
MinWidth="140"
|
||||
Margin="5,0,5,0"
|
||||
Margin="5 0 5 0"
|
||||
Click="Button_Click"
|
||||
Content="No" />
|
||||
Content="{DynamicResource commonNo}" />
|
||||
<Button
|
||||
x:Name="btnOk"
|
||||
MinWidth="140"
|
||||
Margin="5,0,5,0"
|
||||
Margin="5 0 5 0"
|
||||
Click="Button_Click"
|
||||
Content="OK" />
|
||||
Content="{DynamicResource commonOK}" />
|
||||
<Button
|
||||
x:Name="btnYes"
|
||||
MinWidth="140"
|
||||
Margin="5,0,5,0"
|
||||
Margin="5 0 5 0"
|
||||
Click="Button_Click"
|
||||
Content="Yes" />
|
||||
Content="{DynamicResource commonYes}" />
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ namespace Flow.Launcher
|
|||
{
|
||||
ConfirmationWithYesNo = 0,
|
||||
ConfirmationWithYesNoCancel,
|
||||
YesNo,
|
||||
Information,
|
||||
Error,
|
||||
Warning
|
||||
|
|
@ -68,6 +69,9 @@ namespace Flow.Launcher
|
|||
case MessageBoxType.ConfirmationWithYesNo:
|
||||
return Show(caption, msg, MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
case MessageBoxType.YesNo:
|
||||
return Show(caption, msg, MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question);
|
||||
case MessageBoxType.ConfirmationWithYesNoCancel:
|
||||
return Show(caption, msg, MessageBoxButton.YesNoCancel,
|
||||
MessageBoxImage.Question);
|
||||
|
|
@ -168,7 +172,6 @@ namespace Flow.Launcher
|
|||
}
|
||||
private void SetImage(string imageName)
|
||||
{
|
||||
//string uri = string.Format("/Resources/Images/{0}", imageName);
|
||||
string uri = Constant.ProgramDirectory + "/Images/" + imageName;
|
||||
var uriSource = new Uri(uri, UriKind.RelativeOrAbsolute);
|
||||
Img.Source = new BitmapImage(uriSource);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using Flow.Launcher.Core.Resource;
|
|||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin;
|
||||
using static Flow.Launcher.MessageBoxEx;
|
||||
|
||||
namespace Flow.Launcher.SettingPages.ViewModels;
|
||||
|
||||
|
|
@ -62,10 +63,10 @@ public partial class SettingsPaneAboutViewModel : BaseModel
|
|||
[RelayCommand]
|
||||
private void AskClearLogFolderConfirmation()
|
||||
{
|
||||
var confirmResult = MessageBox.Show(
|
||||
var confirmResult = MessageBoxEx.Show(
|
||||
InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"),
|
||||
InternationalizationManager.Instance.GetTranslation("clearlogfolder"),
|
||||
MessageBoxButton.YesNo
|
||||
MessageBoxType.YesNo
|
||||
);
|
||||
|
||||
if (confirmResult == MessageBoxResult.Yes)
|
||||
|
|
|
|||
Loading…
Reference in a new issue