Skip to content

Commit adade4f

Browse files
committed
* Design changes
1 parent 8e4492a commit adade4f

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

MemPlus/Properties/Settings.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MemPlus/Properties/Settings.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<Setting Name="MetroColor" Type="System.Windows.Media.Color" Scope="User">
99
<Value Profile="(Default)">#FF07779C</Value>
1010
</Setting>
11-
<Setting Name="BorderThickness" Type="System.Int32" Scope="User">
11+
<Setting Name="BorderThickness" Type="System.Double" Scope="User">
1212
<Value Profile="(Default)">3</Value>
1313
</Setting>
1414
<Setting Name="StandByCache" Type="System.Boolean" Scope="User">

MemPlus/Views/Windows/ProcessAnalyzerWindow.xaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
77
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
8-
mc:Ignorable="d"
9-
UseLayoutRounding="True"
10-
WindowStartupLocation="CenterScreen"
11-
AllowsTransparency="True"
8+
mc:Ignorable="d" UseLayoutRounding="True"
9+
WindowStartupLocation="CenterScreen" AllowsTransparency="True"
1210
TitleTextAlignment="Center" UseNativeChrome="True"
13-
Title="MemPlus - Process Analyzer" Height="350" Width="500" Icon="/Resources/Images/ram.png" WindowState="Maximized">
11+
Title="MemPlus - Process Analyzer" Height="350" Width="550" Icon="/Resources/Images/ram.png">
1412
<Grid>
1513
<Grid.RowDefinitions>
1614
<RowDefinition />

MemPlus/Views/Windows/SettingsWindow.xaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,11 @@
240240
<Label Margin="3" Grid.Row="1" Grid.Column="0" Content="Metro brush:" />
241241
<syncfusion:ColorPicker Margin="3" x:Name="CpMetroBrush" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" />
242242
<Label Margin="3" Grid.Row="2" Grid.Column="0" Content="Border thickness:" />
243-
<syncfusion:IntegerTextBox Margin="3" x:Name="IntBorderThickness" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" MinValue="0"></syncfusion:IntegerTextBox>
243+
<Slider Margin="3" x:Name="SldBorderThickness" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Minimum="1" ValueChanged="SldBorderThickness_OnValueChanged" />
244244
<Label Margin="3" Grid.Row="3" Grid.Column="0" Content="Window opacity:" />
245245
<Slider x:Name="SldOpacity" Margin="3" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Minimum="30" Maximum="100" Width="180" ValueChanged="SldOpacity_OnValueChanged" />
246246
<Label Margin="3" Grid.Row="4" Grid.Column="0" Content="Resize border:" />
247-
<Slider x:Name="SldWindowResize" Margin="3" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Minimum="2" Maximum="10" Width="180" ValueChanged="SldWindowResize_OnValueChanged" />
248-
247+
<Slider x:Name="SldWindowResize" Margin="3" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Minimum="1" Maximum="10" Width="180" ValueChanged="SldWindowResize_OnValueChanged" />
249248
<Label Grid.Row="5" Grid.Column="0" Content="Warning level:" />
250249
<syncfusion:IntegerTextBox x:Name="ItbWarningLevel" Grid.Row="5" Grid.Column="1" MinValue="1" MaxValue="99" />
251250
<Label Grid.Row="5" Grid.Column="2" Content="%" />

MemPlus/Views/Windows/SettingsWindow.xaml.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private void LoadProperties()
173173
//Theme
174174
CboStyle.Text = Properties.Settings.Default.VisualStyle;
175175
CpMetroBrush.Color = Properties.Settings.Default.MetroColor;
176-
IntBorderThickness.Value = Properties.Settings.Default.BorderThickness;
176+
SldBorderThickness.Value = Properties.Settings.Default.BorderThickness;
177177
SldOpacity.Value = Properties.Settings.Default.WindowOpacity * 100;
178178
SldWindowResize.Value = Properties.Settings.Default.WindowResizeBorder;
179179
ItbWarningLevel.Value = Properties.Settings.Default.WarningLevel;
@@ -303,7 +303,7 @@ private void SaveProperties()
303303
//Theme
304304
Properties.Settings.Default.VisualStyle = CboStyle.Text;
305305
Properties.Settings.Default.MetroColor = CpMetroBrush.Color;
306-
if (IntBorderThickness.Value != null) Properties.Settings.Default.BorderThickness = (int)IntBorderThickness.Value;
306+
Properties.Settings.Default.BorderThickness = SldBorderThickness.Value;
307307
Properties.Settings.Default.WindowOpacity = SldOpacity.Value / 100;
308308
Properties.Settings.Default.WindowResizeBorder = SldWindowResize.Value;
309309
if (ItbWarningLevel.Value != null) Properties.Settings.Default.WarningLevel = ItbWarningLevel.Value.Value;
@@ -491,6 +491,16 @@ private void LsvExclusions_OnDrop(object sender, DragEventArgs e)
491491
}
492492
}
493493

494+
/// <summary>
495+
/// Method that is called when the border thickness should change
496+
/// </summary>
497+
/// <param name="sender">The object that called this method</param>
498+
/// <param name="e">The RoutedPropertyChangedEventArgs</param>
499+
private void SldBorderThickness_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
500+
{
501+
BorderThickness = new Thickness(SldBorderThickness.Value);
502+
}
503+
494504
/// <summary>
495505
/// Method that is called when the opacity should change dynamically
496506
/// </summary>

0 commit comments

Comments
 (0)