Skip to content

Commit d67afc6

Browse files
committed
Improved some problems with the new design
- Fixed centering issues - Made main window not hide anymore when a dialogue box appears - Changed Banner Image
1 parent 457e4a5 commit d67afc6

10 files changed

Lines changed: 99 additions & 119 deletions

File tree

Cloaks/App.xaml

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252

5353
<!--Window Title Bar-->
5454
<Style x:Key="windowTitleBar" TargetType="Border">
55-
<Setter Property="BorderThickness" Value="2"/>
55+
<Setter Property="BorderThickness" Value="0"/>
5656
<Setter Property="CornerRadius" Value="5,5,0,0"/>
57-
<Setter Property="Margin" Value="-2, 0, -2, 0"/>
57+
<Setter Property="Margin" Value="0, -2, 0, 0"/>
5858

5959
<Setter Property="HorizontalAlignment" Value="Left"/>
6060
<Setter Property="VerticalAlignment" Value="Top"/>
6161

6262
<Setter Property="Height" Value="33"/>
63-
<Setter Property="Width" Value="646"/>
63+
<Setter Property="Width" Value="650"/>
6464

6565
<Setter Property="Background" Value="#FF1C1C1C"/>
6666

@@ -69,7 +69,8 @@
6969

7070
<!--Window Title Text-->
7171
<Style x:Key="windowTitle" TargetType="Label">
72-
<Setter Property="Margin" Value="286,0,286,-3"/>
72+
<Setter Property="HorizontalAlignment" Value="Center"/>
73+
<Setter Property="VerticalAlignment" Value="Center"/>
7374

7475
<Setter Property="Foreground" Value="White"/>
7576
<Setter Property="Background" Value="{x:Null}"/>
@@ -86,10 +87,10 @@
8687
<Setter Property="Background" Value="Transparent"/>
8788
<Setter Property="Foreground" Value="WhiteSmoke"/>
8889

89-
<Setter Property="HorizontalAlignment" Value="Left"/>
90-
<Setter Property="VerticalAlignment" Value="Top"/>
90+
<Setter Property="HorizontalAlignment" Value="Right"/>
91+
<Setter Property="VerticalAlignment" Value="Center"/>
9192

92-
<Setter Property="Height" Value="28"/>
93+
<Setter Property="Height" Value="30"/>
9394
<Setter Property="Width" Value="30"/>
9495

9596
<Setter Property="BorderThickness" Value="0"/>
@@ -113,7 +114,7 @@
113114
<Style x:Key="frameTitle" TargetType="Label">
114115
<Setter Property="HorizontalAlignment" Value="Center"/>
115116

116-
<Setter Property="Margin" Value="0,110,0,0"/>
117+
<Setter Property="Margin" Value="0,120,0,0"/>
117118

118119
<Setter Property="FontSize" Value="24"/>
119120
<Setter Property="Foreground" Value="White"/>
@@ -192,16 +193,45 @@
192193
<Setter Property="FontSize" Value="19"/>
193194
</Style>
194195

196+
<!--Nav-->
197+
<Style x:Key="nav" TargetType="Border">
198+
<Setter Property="VerticalAlignment" Value="Center"/>
199+
<Setter Property="Background" Value="#FF1C1C1C"/>
200+
<Setter Property="CornerRadius" Value="5"/>
201+
<Setter Property="HorizontalAlignment" Value="Left"/>
202+
<Setter Property="Height" Value="350"/>
203+
<Setter Property="Width" Value="150"/>
204+
<Setter Property="Grid.RowSpan" Value="2"/>
205+
<Setter Property="Margin" Value="10, 30, 0, 0"/>
206+
207+
</Style>
208+
209+
<!--Nav Button-->
210+
<Style x:Key="navButton" TargetType="Button" BasedOn="{StaticResource hoverButton}">
211+
<Setter Property="Height" Value="30"/>
212+
<Setter Property="Width" Value="135"/>
213+
214+
<Setter Property="HorizontalAlignment" Value="Center"/>
215+
</Style>
216+
217+
<!--Nav Button Grid-->
218+
<Style x:Key="navButtonGrid" TargetType="Grid">
219+
<Setter Property="Height" Value="30"/>
220+
<Setter Property="Width" Value="135"/>
221+
222+
<Setter Property="HorizontalAlignment" Value="Center"/>
223+
<Setter Property="VerticalAlignment" Value="Center"/>
224+
</Style>
225+
195226
<!--Nav Links-->
196227
<Style x:Key="navText" TargetType="Label">
197-
<Setter Property="VerticalAlignment" Value="Top"/>
198-
<Setter Property="VerticalContentAlignment" Value="Center"/>
228+
<Setter Property="VerticalAlignment" Value="Center"/>
229+
<Setter Property="HorizontalAlignment" Value="Left"/>
199230

200-
<Setter Property="Margin" Value="30,-3,10,0"/>
231+
<Setter Property="Margin" Value="50, -2, 0, 0"/>
201232

202233
<Setter Property="FontSize" Value="18"/>
203234
<Setter Property="Foreground" Value="White"/>
204-
<Setter Property="Background" Value="{x:Null}"/>
205235
<Setter Property="FontFamily" Value="/Cloaks+;component/Assets/fonts/Louis George Cafe.ttf #Louis George Café"/>
206236
</Style>
207237

@@ -218,18 +248,12 @@
218248
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
219249
</Style>
220250

221-
<!--Nav-->
222-
<Style x:Key="nav" TargetType="Border">
223-
<Setter Property="VerticalAlignment" Value="Top"/>
224-
</Style>
225-
226-
227-
<!--Dialouge Title Bar-->
251+
<!--Dialogue Title Bar-->
228252
<Style x:Key="dialogueWindowTitleBar" TargetType="Border" BasedOn="{StaticResource windowTitleBar}">
229-
<Setter Property="Width" Value="404"/>
253+
<Setter Property="Width" Value="400"/>
230254
<Setter Property="Height" Value="38"/>
231-
<Setter Property="Margin" Value="0, -2, 2, 0"/>
232-
<Setter Property="CornerRadius" Value="5,5,0,0"/>
255+
<Setter Property="Margin" Value="0"/>
256+
<Setter Property="CornerRadius" Value="5, 5, 0, 0"/>
233257
</Style>
234258
</Application.Resources>
235259
</Application>

Cloaks/Assets/banner.png

-13.5 KB
Loading

Cloaks/Cloaks+.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
<Resource Include="Assets\cloaks_plus.ico" />
224224
</ItemGroup>
225225
<ItemGroup>
226-
<EmbeddedResource Include="EmbeddedAssemblies\Newtonsoft.Json.dll" />
226+
<Content Include="EmbeddedAssemblies\Newtonsoft.Json.dll" />
227227
</ItemGroup>
228228
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
229229
<Target Name="AfterResolveReferences">

Cloaks/Cloaks+.csproj.user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<ProjectView>ProjectFiles</ProjectView>
4+
<ProjectView>ShowAllFiles</ProjectView>
55
</PropertyGroup>
66
</Project>

Cloaks/DialogueBox.xaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
x:Class="Cloaks.DialogueBox"
88
mc:Ignorable="d"
99
Title="Cloaks+ Message"
10-
Topmost="False"
10+
Topmost="True"
1111
WindowStartupLocation="CenterScreen"
1212
WindowStyle="None"
1313
ResizeMode="NoResize"
1414
AllowsTransparency="True"
1515
BorderThickness="0"
1616
Background="Transparent"
17-
Width="400"
17+
Width="450"
1818
Loaded="Box_Loaded"
1919
>
2020
<Window.TaskbarItemInfo>
@@ -26,26 +26,26 @@
2626
</Window.TaskbarItemInfo>
2727

2828
<Grid Margin="0,50,0,0">
29-
<Border x:Name="MainBorder" BorderThickness="0" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Width="400" Background="#FF151515" CornerRadius="10" Grid.RowSpan="2">
29+
<Border x:Name="MainBorder" BorderThickness="0" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Width="400" Background="#FF151515" CornerRadius="5" Grid.RowSpan="2">
3030
<Border.Effect>
31-
<DropShadowEffect ShadowDepth="0"/>
31+
<DropShadowEffect ShadowDepth="0" BlurRadius="20"/>
3232
</Border.Effect>
3333
<Grid>
3434

3535
<!--Window Title Bar-->
3636
<Border x:Name="TopBorder" Style="{DynamicResource dialogueWindowTitleBar}" MouseDown="TopBorder_MouseDown">
37-
<Grid Margin="-1,-1,1,1">
38-
<Label x:Name="WindowTitle" Content="" Style="{DynamicResource windowTitle}" Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
39-
<Image x:Name="Logo" Source="Assets/logo_transparent.png" Margin="1,0,0,1" HorizontalAlignment="Left" />
40-
<Button Content="&#xE711;" Style="{DynamicResource windowButton}" Margin="1,1,3,0" Click="CloseButton_Click" HorizontalAlignment="Right" VerticalAlignment="Center"/>
37+
<Grid>
38+
<Label x:Name="WindowTitle" Content="" Style="{DynamicResource windowTitle}"/>
39+
<Image x:Name="Logo" Source="Assets/logo_transparent.png" Margin="2,0,0,1" HorizontalAlignment="Left" />
40+
<Button Content="&#xE711;" Style="{DynamicResource windowButton}" Margin="1,1,3,0" Click="CloseButton_Click"/>
4141
</Grid>
4242
</Border>
4343

4444
<Border x:Name="DialogueContent">
4545
<Grid Margin="0,0,0,15" >
4646
<TextBlock x:Name="DialogueMessage" Style="{DynamicResource frameText}" HorizontalAlignment="Center" Margin="20,50,20,0">
4747

48-
</TextBlock>
48+
</TextBlock>
4949

5050
<Button x:Name="OKButton" Content="OK" Style="{DynamicResource hoverButton}" Click="OKButton_Click" Margin="0, 155, 20, 0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="90" Height="40"/>
5151
<Button x:Name="CancelButton" Content="Cancel" Style="{DynamicResource hoverButton}" Click="CancelButton_Click" Margin="0, 155, 120, 0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="90" Height="40"/>

Cloaks/DialogueBox.xaml.cs

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,52 +29,32 @@ private DialogueBox(string title, string message, bool error, Action<bool> callb
2929

3030
public static void Show(string title, string message, MainWindow main)
3131
{
32-
try
33-
{
34-
main.Hide();
35-
}
36-
catch (Exception) { };
37-
new DialogueBox(title, message, false, null, main, false).Show();
32+
33+
new DialogueBox(title, message, false, null, main, false).ShowDialog();
3834
}
3935

4036
public static void ShowWithCallback(string title, string message, Action<bool> callback, MainWindow main)
4137
{
42-
try
43-
{
44-
main.Hide();
45-
}
46-
catch (Exception) { };
47-
new DialogueBox(title, message, false, callback, main, false).Show();
38+
39+
new DialogueBox(title, message, false, callback, main, false).ShowDialog();
4840
}
4941

5042
public static void ShowError(string title, string message, MainWindow main)
5143
{
52-
try
53-
{
54-
main.Hide();
55-
}
56-
catch (Exception) { };
57-
new DialogueBox(title, message, true, null, main, false).Show();
44+
45+
new DialogueBox(title, message, true, null, main, false).ShowDialog();
5846
}
5947

6048
public static void ShowErrorWithCallback(string title, string message, Action<bool> callback, MainWindow main)
6149
{
62-
try
63-
{
64-
main.Hide();
65-
}
66-
catch (Exception) { };
67-
new DialogueBox(title, message, true, callback, main, false).Show();
50+
51+
new DialogueBox(title, message, true, callback, main, false).ShowDialog();
6852
}
6953

7054
public static void ShowEULA(Action<bool> callback, MainWindow main)
7155
{
72-
try
73-
{
74-
main.Hide();
75-
}
76-
catch (Exception) { };
77-
new DialogueBox("Cloaks+ End User License Agreement", @"By clicking 'I Agree' below, you agree to the Cloaks+ End User License Agreement. To view the contents of the agreement, click the 'EULA' button below.", false, callback, main, true).Show();
56+
57+
new DialogueBox("Cloaks+ End User License Agreement", @"By clicking 'I Agree' below, you agree to the Cloaks+ End User License Agreement. To view the contents of the agreement, click the 'EULA' button below.", false, callback, main, true).ShowDialog();
7858
}
7959

8060
private void Box_Loaded(object sender, RoutedEventArgs e)

Cloaks/MainWindow.xaml

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
AllowsTransparency="True"
1515
BorderThickness="0"
1616
Background="Transparent"
17-
Height="446.995"
18-
Width="718.087"
17+
Height="420"
18+
Width="670"
1919
Loaded="Cloaks_Loaded"
2020
>
2121
<Window.TaskbarItemInfo>
@@ -26,36 +26,25 @@
2626
></TaskbarItemInfo>
2727
</Window.TaskbarItemInfo>
2828

29-
<Grid>
30-
31-
<Grid.RowDefinitions>
32-
<RowDefinition Height="239*"/>
33-
<RowDefinition Height="208*"/>
34-
</Grid.RowDefinitions>
35-
<Grid.ColumnDefinitions>
36-
<ColumnDefinition Width="127*"/>
37-
<ColumnDefinition Width="7*"/>
38-
</Grid.ColumnDefinitions>
39-
40-
41-
<Border x:Name="MainBorder" BorderThickness="0" HorizontalAlignment="Center" Height="382" Margin="34,42,4,23" VerticalAlignment="Center" Width="642" Background="#FF151515" CornerRadius="5" Grid.RowSpan="2">
29+
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
30+
<Border x:Name="MainBorder" BorderThickness="0" HorizontalAlignment="Center" Height="400" Margin="0" VerticalAlignment="Center" Width="650" Background="#FF151515" CornerRadius="5" Grid.RowSpan="2">
4231
<Border.Effect>
43-
<DropShadowEffect ShadowDepth="0"/>
32+
<DropShadowEffect ShadowDepth="0" BlurRadius="10"/>
4433
</Border.Effect>
4534
<Grid>
4635

4736
<!--Window Title Bar-->
4837
<Border x:Name="TopBorder" Style="{DynamicResource windowTitleBar}" MouseDown="TopBorder_MouseDown">
4938
<Grid Margin="-1,-1,1,1">
5039
<Label x:Name="TopBorderCloaksMainLabel" Content="Cloaks+" Style="{DynamicResource windowTitle}"/>
51-
<Image x:Name="Logo" Source="Assets/logo_transparent.png" Margin="1,0,611,1"/>
52-
<Button Content="&#xE711;" Style="{DynamicResource windowButton}" Margin="612,0,0,0" Click="CloseButton_Click"/>
53-
<Button Content="&#xE738;" Style="{DynamicResource windowButton}" Margin="577,0,0,0" Click="MinimizeButton_Click"/>
40+
<Image x:Name="Logo" Source="Assets/logo_transparent.png" Margin="2,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
41+
<Button Content="&#xE711;" Style="{DynamicResource windowButton}" Margin="0,0,0,0" Click="CloseButton_Click"/>
42+
<Button Content="&#xE738;" Style="{DynamicResource windowButton}" Margin="0,0,32,0" Click="MinimizeButton_Click"/>
5443
</Grid>
5544
</Border>
5645

57-
<Border x:Name="HomeFrame" Style="{DynamicResource frame}">
58-
<Grid Margin="0,0,-20,0" >
46+
<Border x:Name="HomeFrame" Style="{DynamicResource frame}" >
47+
<Grid Margin="0,0,-20,0">
5948
<Image Style="{DynamicResource frameImage}"/>
6049
<Label Content="Cloaks+" Style="{DynamicResource frameTitle}"/>
6150

@@ -123,35 +112,35 @@
123112

124113
</Grid>
125114
</Border>
126-
127-
128-
<Border x:Name="SelectFrame" CornerRadius="2.5,2.5,0,0" Background="#FF1C1C1C" HorizontalAlignment="Left" Height="335" Margin="-90,92,0,20" VerticalAlignment="Center" Width="148" Grid.RowSpan="2">
115+
116+
117+
<Border x:Name="SelectFrame" Style="{StaticResource nav}">
129118
<Grid>
130119
<Image Source="Assets/banner.png" Margin="10,10,10,286"/>
131120
<Image Source="Assets/line.png" Margin="0,10,0,239"/>
132121

133-
<Button x:Name="SideHomeButton" Style="{StaticResource hoverButton}" Margin="10,96,0,211" Click="HomeFrame_Click" Background="#434343">
134-
<Grid>
135-
<Image Source="Assets/icons/home.png" Margin="7,1,93,2"/>
122+
<Button x:Name="SideHomeButton" Style="{StaticResource navButton}" Margin="0, -50, 0, 0" Click="HomeFrame_Click" Background="#434343">
123+
<Grid Style="{StaticResource navButtonGrid}">
124+
<Image Source="Assets/icons/home.png" Margin="20, 4, 0, 4" HorizontalAlignment="Left"/>
136125
<Label Content="Home" Style="{StaticResource navText}"/>
137126
</Grid>
138127
</Button>
139-
140-
<Button x:Name="InstallButtonSide" Style="{StaticResource hoverButton}" Margin="10,129,0,178" Click="InstallFrame_Click">
141-
<Grid>
142-
<Image Source="Assets/icons/download.png" Margin="7,1,93,2"/>
128+
129+
<Button x:Name="InstallButtonSide" Style="{StaticResource navButton}" Margin="0, 20, 0, 0" Click="InstallFrame_Click">
130+
<Grid Style="{StaticResource navButtonGrid}">
131+
<Image Source="Assets/icons/download.png" Margin="20, 4, 0, 4" HorizontalAlignment="Left"/>
143132
<Label Content="Install" Style="{StaticResource navText}"/>
144133
</Grid>
145134
</Button>
146-
147-
<Button x:Name="CreditsButtonSide" Style="{StaticResource hoverButton}" Margin="10,162,0,145" Click="CreditsFrame_Click">
148-
<Grid>
149-
<Image Source="Assets/icons/people.png" Margin="7,1,93,2"/>
135+
136+
<Button x:Name="CreditsButtonSide" Style="{StaticResource navButton}" Margin="0, 90, 0, 0" Click="CreditsFrame_Click">
137+
<Grid Style="{StaticResource navButtonGrid}">
138+
<Image Source="Assets/icons/people.png" Margin="20, 4, 0, 4" HorizontalAlignment="Left"/>
150139
<Label Content="Credits" Style="{StaticResource navText}"/>
151140
</Grid>
152141
</Button>
153142

154-
<Label Content="Cloaks+ v.1.4" Style="{StaticResource navVersion}" Margin="3, 305, 0, 0" Width="124"/>
143+
<Label Content="Cloaks+ v.1.4" Style="{StaticResource navVersion}" Margin="3, 0, 0, 3" Width="124" VerticalAlignment="Bottom"/>
155144
</Grid>
156145
</Border>
157146
</Grid>

0 commit comments

Comments
 (0)