mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-10 07:46:15 +02:00
Center dialogs on parent window
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
mc:Ignorable="d"
|
||||
ResizeMode="NoResize"
|
||||
Title="ColorDialog"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight">
|
||||
<Grid>
|
||||
<StackPanel Margin="15">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
mc:Ignorable="d"
|
||||
Title="InputDialog"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight">
|
||||
<Grid>
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15">
|
||||
|
||||
@@ -418,7 +418,11 @@ namespace DesktopMagic
|
||||
|
||||
private void ChangePrimaryColorButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ColorDialog colorDialog = new ColorDialog("Set Primary Color", Settings.CurrentLayout.Theme.PrimaryColor);
|
||||
ColorDialog colorDialog = new ColorDialog("Set Primary Color", Settings.CurrentLayout.Theme.PrimaryColor)
|
||||
{
|
||||
Owner = this
|
||||
};
|
||||
|
||||
if (colorDialog.ShowDialog() == true)
|
||||
{
|
||||
Settings.CurrentLayout.Theme.PrimaryColor = colorDialog.ResultColor;
|
||||
@@ -428,7 +432,11 @@ namespace DesktopMagic
|
||||
|
||||
private void ChangeSecondaryColorButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ColorDialog colorDialog = new ColorDialog("Set Secondary Color", Settings.CurrentLayout.Theme.SecondaryColor);
|
||||
ColorDialog colorDialog = new ColorDialog("Set Secondary Color", Settings.CurrentLayout.Theme.SecondaryColor)
|
||||
{
|
||||
Owner = this
|
||||
};
|
||||
|
||||
if (colorDialog.ShowDialog() == true)
|
||||
{
|
||||
Settings.CurrentLayout.Theme.SecondaryColor = colorDialog.ResultColor;
|
||||
@@ -438,7 +446,11 @@ namespace DesktopMagic
|
||||
|
||||
private void ChangeBackgroundColorButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ColorDialog colorDialog = new ColorDialog("Set Background Color", Settings.CurrentLayout.Theme.BackgroundColor);
|
||||
ColorDialog colorDialog = new ColorDialog("Set Background Color", Settings.CurrentLayout.Theme.BackgroundColor)
|
||||
{
|
||||
Owner = this
|
||||
};
|
||||
|
||||
if (colorDialog.ShowDialog() == true)
|
||||
{
|
||||
Settings.CurrentLayout.Theme.BackgroundColor = colorDialog.ResultColor;
|
||||
@@ -495,7 +507,11 @@ namespace DesktopMagic
|
||||
|
||||
private void NewLayoutButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
InputDialog inputDialog = new((string)FindResource("enterLayoutName"));
|
||||
InputDialog inputDialog = new((string)FindResource("enterLayoutName"))
|
||||
{
|
||||
Owner = this
|
||||
};
|
||||
|
||||
if (inputDialog.ShowDialog() == true)
|
||||
{
|
||||
if (Settings.Layouts.Any(l => l.Name.Trim() == inputDialog.ResponseText.Trim()))
|
||||
@@ -659,7 +675,11 @@ namespace DesktopMagic
|
||||
|
||||
private void PluginManagerButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PluginManager pluginManager = new PluginManager();
|
||||
PluginManager pluginManager = new PluginManager
|
||||
{
|
||||
Owner = this
|
||||
};
|
||||
|
||||
pluginManager.ShowDialog();
|
||||
LoadPlugins();
|
||||
LoadLayout(Visibility != Visibility.Visible);
|
||||
|
||||
Reference in New Issue
Block a user