Skip to content

Commit 09a6d22

Browse files
committed
customdatetime: add red outline for invalid values, add new theme colors, theme editor: sort by key, disable column rearrange and sort click, set first row autoselected, set datagrid header visible and styled, add new theme colors to checkboxes and radiobuttons set sliders to Int ticks, start initial cleanup
1 parent 434dea4 commit 09a6d22

File tree

6 files changed

+153
-181
lines changed

6 files changed

+153
-181
lines changed

UnityLauncherPro/GetUnityInstallations.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public static UnityInstallation[] Scan()
8282
} // got folders
8383
} // all root folders
8484

85+
// sort by version
8586
results.Sort((s1, s2) => Tools.VersionAsInt(s2.Version).CompareTo(Tools.VersionAsInt(s1.Version)));
8687

8788
return results.ToArray();

UnityLauncherPro/MainWindow.xaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@
407407
<ControlTemplate TargetType="{x:Type CheckBox}">
408408
<BulletDecorator Background="Transparent">
409409
<BulletDecorator.Bullet>
410-
<Border x:Name="Border" Margin="0 1 0 0" Width="14" Height="13" CornerRadius="0" Background="#ffffff" BorderThickness="1" BorderBrush="#404040">
410+
<Border x:Name="Border" Margin="0 1 0 0" Width="14" Height="13" CornerRadius="0" Background="{DynamicResource ThemeRadioCheckBoxBackground}" BorderThickness="1" BorderBrush="#404040">
411411
<Path Width="8" Height="8" x:Name="CheckMark" SnapsToDevicePixels="False" Stroke="#000000" StrokeThickness="1.75" Data="M 0 3 L 3 6 L 7 0" Margin="1,1,0,0" />
412412
</Border>
413413
</BulletDecorator.Bullet>
@@ -442,10 +442,10 @@
442442
<ControlTemplate TargetType="{x:Type RadioButton}">
443443
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Background="Transparent">
444444
<Grid>
445-
<Ellipse x:Name="TargetEllipse" Width="12" Height="12" Fill="{DynamicResource ThemeButtonForeground}" Stroke="Transparent" />
445+
<Ellipse x:Name="TargetEllipse" Width="12" Height="12" Fill="{DynamicResource ThemeRadioCheckBoxBackground}" Stroke="Transparent" />
446446
<Ellipse x:Name="CheckedEllipse" Width="6" Height="6" Fill="{DynamicResource ThemeRadioButtonSelected}" Visibility="Collapsed"/>
447447
</Grid>
448-
<Label Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" Background="{TemplateBinding Background}"/>
448+
<Label Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}"/>
449449
</StackPanel>
450450
<ControlTemplate.Triggers>
451451
<Trigger Property="IsChecked" Value="True">
@@ -1000,19 +1000,19 @@
10001000
<CheckBox x:Name="chkShowPlatform" Content="Show current target platform (if exists in .csproj)" ToolTip="Shows target platform column" Checked="ChkShowPlatform_Checked" Unchecked="ChkShowPlatform_Checked" HorizontalAlignment="Left"/>
10011001
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="0,0,0,4">
10021002
<CheckBox x:Name="chkUseCustomTheme" Content="Load custom theme" ToolTip="Loads theme.ini from application folder" Checked="ChkUseCustomTheme_Checked" Unchecked="ChkUseCustomTheme_Checked" HorizontalAlignment="Left"/>
1003-
<TextBox x:Name="txtCustomThemeFile" MinWidth="128" ToolTip="Default is theme.ini" Padding="0,3,0,0" Margin="5,0,0,0" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" Text="theme.ini" LostFocus="TxtCustomThemeFile_LostFocus" PreviewKeyDown="TxtCustomThemeFile_PreviewKeyDown" />
1003+
<TextBox x:Name="txtCustomThemeFile" BorderBrush="Transparent" MinWidth="128" ToolTip="Default is theme.ini" Padding="0,3,0,0" Margin="5,0,0,0" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" Text="theme.ini" LostFocus="TxtCustomThemeFile_LostFocus" PreviewKeyDown="TxtCustomThemeFile_PreviewKeyDown" />
10041004
<Button Style="{StaticResource CustomButton}" ToolTip="Reload theme" x:Name="btnReloadTheme" Content="" Height="22" Width="22" HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="16" Padding="1,-2,1,1" BorderBrush="{x:Null}" Click="BtnReloadTheme_Click" Margin="5,0,0,0"/>
10051005
<Button Style="{StaticResource CustomButton}" ToolTip="Explore Themes folder" x:Name="btnExploreFolder" Content="..." Height="22" Width="22" HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="16" Padding="1,-2,1,1" BorderBrush="{x:Null}" Click="BtnExploreFolder_Click" Margin="5,0,0,0"/>
10061006
<Button Style="{StaticResource CustomButton}" ToolTip="Open theme editor" x:Name="btnThemeEditor" Content="" Height="22" Width="22" HorizontalAlignment="Right" VerticalAlignment="Top" Padding="1,-2,1,1" BorderBrush="{x:Null}" Click="BtnThemeEditor_Click" Margin="5,0,0,0"/>
10071007
</StackPanel>
10081008

10091009
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="0,0,0,4">
1010-
<TextBox x:Name="txtRootFolderForNewProjects" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="300" ToolTip="Root folder for quick New Projects (so that you dont have to pick project folder every time)" Padding="0,3,0,0" TextChanged="TxtRootFolderForNewProjects_TextChanged" />
1010+
<TextBox x:Name="txtRootFolderForNewProjects" BorderBrush="Transparent" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="300" ToolTip="Root folder for quick New Projects (so that you dont have to pick project folder every time)" Padding="0,3,0,0" TextChanged="TxtRootFolderForNewProjects_TextChanged" />
10111011
<Button Style="{StaticResource CustomButton}" x:Name="btnBrowseProjectRootFolder" Content="..." Margin="6,0,0,0" MinWidth="22" Click="BtnBrowseProjectRootFolder_Click" MinHeight="22" FontSize="16" ToolTip="Browse for new projects root folder.." />
10121012
<Label Content="Root Folder for New Projects" Foreground="{DynamicResource ThemeButtonForeground}" />
10131013
</StackPanel>
10141014
<StackPanel Grid.Row="3" Orientation="Horizontal">
1015-
<TextBox x:Name="txtWebglRelativePath" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="200" ToolTip="Inside Builds/ folder you might have separate folder for webgl builds, like webgl/. Used for starting WebGL server there" Padding="0,3,0,0" TextChanged="TxtWebglRelativePath_TextChanged" />
1015+
<TextBox x:Name="txtWebglRelativePath" BorderBrush="Transparent" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="200" ToolTip="Inside Builds/ folder you might have separate folder for webgl builds, like webgl/. Used for starting WebGL server there" Padding="0,3,0,0" TextChanged="TxtWebglRelativePath_TextChanged" />
10161016
<Label Content="Webgl Relative Build Path (inside Builds/)" Foreground="{DynamicResource ThemeButtonForeground}" />
10171017
</StackPanel>
10181018
</StackPanel>
@@ -1025,13 +1025,13 @@
10251025
</StackPanel>
10261026
<StackPanel Orientation="Horizontal">
10271027
<CheckBox x:Name="chkUseCustomLastModified" Content="Date format" ToolTip="Last modified date format" HorizontalAlignment="Left" Checked="ChkUseCustomLastModified_Checked" Unchecked="ChkUseCustomLastModified_Checked"/>
1028-
<TextBox x:Name="txtCustomDateTimeFormat" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="150" ToolTip="Default is dd/MM/yyyy HH:mm:ss" Padding="0,3,0,0" Margin="5,0,0,0" Text="dd/MM/yyyy HH:mm:ss" LostFocus="TxtCustomDateTimeFormat_LostFocus" TextChanged="TxtCustomDateTimeFormat_TextChanged" />
1029-
1028+
<TextBox x:Name="txtCustomDateTimeFormat" BorderBrush="Transparent" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="150" ToolTip="Default is dd/MM/yyyy HH:mm:ss" Padding="0,3,0,0" Margin="5,0,0,0" Text="dd/MM/yyyy HH:mm:ss" LostFocus="TxtCustomDateTimeFormat_LostFocus" TextChanged="TxtCustomDateTimeFormat_TextChanged">
1029+
</TextBox>
10301030
</StackPanel>
10311031
<CheckBox x:Name="chkHumanFriendlyDateTime" Content="Use human friendly last modified" ToolTip="Last modified date format" HorizontalAlignment="Left" Checked="ChkHumanFriendlyDateTime_Checked" Unchecked="ChkHumanFriendlyDateTime_Checked"/>
1032-
<Label Foreground="{DynamicResource ThemeButtonForeground}">Project name:</Label>
1032+
<Label Foreground="{DynamicResource ThemeButtonForeground}" Padding="0,5,5,0">Project name:</Label>
10331033
<StackPanel Orientation="Horizontal">
1034-
<RadioButton x:Name="radioProjNameFolder" Content="ProjectName.txt or Folder" Margin="4,0,0,0" GroupName="toggleGroupProjectName" IsChecked="True" Checked="RadioProjNameFolder_Checked" ToolTip="Take project name from project folder name OR ProjectName.txt if file exists in ProjectSettings/ folder"/>
1034+
<RadioButton x:Name="radioProjNameFolder" Content="ProjectName.txt or Folder" Margin="3,0,0,0" GroupName="toggleGroupProjectName" IsChecked="True" Checked="RadioProjNameFolder_Checked" ToolTip="Take project name from project folder name OR ProjectName.txt if file exists in ProjectSettings/ folder"/>
10351035
<RadioButton x:Name="radioProjNameProductName" Content="Settings ProductName" Margin="5,0,0,0" GroupName="toggleGroupProjectName" Checked="RadioProjNameProductName_Checked" ToolTip="Take project name from player settings ProductName field"/>
10361036
</StackPanel>
10371037
</StackPanel>

UnityLauncherPro/MainWindow.xaml.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,11 +2177,12 @@ void ValidateCustomDateFormat(string format)
21772177
currentDateFormat = format;
21782178
Properties.Settings.Default.customDateFormat = currentDateFormat;
21792179
Properties.Settings.Default.Save();
2180-
txtCustomDateTimeFormat.Foreground = System.Windows.Media.Brushes.Black;
2180+
txtCustomDateTimeFormat.BorderBrush = System.Windows.Media.Brushes.Transparent;
21812181
}
21822182
else // invalid format
21832183
{
2184-
txtCustomDateTimeFormat.Foreground = System.Windows.Media.Brushes.Red;
2184+
//txtCustomDateTimeFormat.Foreground = System.Windows.Media.Brushes.Red;
2185+
txtCustomDateTimeFormat.BorderBrush = System.Windows.Media.Brushes.Red;
21852186
currentDateFormat = defaultDateFormat;
21862187
}
21872188
}
Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:local="clr-namespace:UnityLauncherPro">
4-
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3+
4+
<!--window-->
5+
<SolidColorBrush x:Key="ThemeMainTitle" Color="#FFB8B8B8"/>
56
<SolidColorBrush x:Key="ThemeDarkestBackground" Color="#FF121212"/>
67
<SolidColorBrush x:Key="ThemeDarkMenuBar" Color="#FF0C0C0C"/>
78
<SolidColorBrush x:Key="ThemeMainBackgroundColor" Color="#FF262626"/>
8-
<SolidColorBrush x:Key="ThemeTextBoxBackground" Color="#FF333337"/>
99
<SolidColorBrush x:Key="ThemeDeactiveTabForeground" Color="#FFC1C1C1"/>
1010
<SolidColorBrush x:Key="ThemeDeactiveTabBackground" Color="#FF1D1D1D"/>
11+
<SolidColorBrush x:Key="ThemeWindowMinClose" Color="#FFC3C3C3"/>
12+
13+
<!--datagrid-->
1114
<SolidColorBrush x:Key="ThemeDatagridHeaderBackground" Color="#4C3F3F46"/>
1215
<SolidColorBrush x:Key="ThemeDatagridHeaderForeground" Color="#FFB6B6B6"/>
1316
<SolidColorBrush x:Key="ThemeDatagridHeaderBorder" Color="#4C000000"/>
1417
<SolidColorBrush x:Key="ThemeDataGridRowMouseOver" Color="#7F007ACC"/>
1518
<SolidColorBrush x:Key="ThemeDataGridRowSelectedBackground" Color="#FF007ACC"/>
19+
<SolidColorBrush x:Key="ThemeGridForeground" Color="#FFD8D8D8"/>
20+
<SolidColorBrush x:Key="ThemeGridHorizontalGridLines" Color="#4C000000"/>
21+
<SolidColorBrush x:Key="ThemeGridVerticalGridLines" Color="#19000000"/>
22+
<SolidColorBrush x:Key="ThemeGridGreenText" Color="#FF00C500"/>
23+
<SolidColorBrush x:Key="ThemeGridRedText" Color="#FFF54F4F"/>
24+
25+
<!--scrollbar-->
1626
<SolidColorBrush x:Key="ThemeScrollArrowPressed" Color="#FF838383"/>
1727
<SolidColorBrush x:Key="ThemeScrollArrowForeground" Color="#FF5E5E64"/>
1828
<SolidColorBrush x:Key="ThemeScrollBarThumbFill" Color="#FF6A6969"/>
1929
<SolidColorBrush x:Key="ThemeScrollBarBackground" Color="#FF151515"/>
2030
<SolidColorBrush x:Key="ThemeScrollBarFill" Color="#FF47474B"/>
31+
<SolidColorBrush x:Key="ThemeScrollBarEnabledForeground" Color="#FF000000"/>
2132

2233
<!--buttons-->
2334
<SolidColorBrush x:Key="ThemeButtonForegroundDisabled" Color="#FF707070"/>
@@ -27,9 +38,8 @@
2738
<SolidColorBrush x:Key="ThemeButtonBackground" Color="#FF3F3F46"/>
2839
<SolidColorBrush x:Key="ThemeButtonForeground" Color="#FFC1C1C1"/>
2940

30-
<!--custom components-->
31-
<SolidColorBrush x:Key="ThemeMainTitle" Color="#FFB8B8B8"/>
32-
<SolidColorBrush x:Key="ThemeScrollBarEnabledForeground" Color="#FF000000"/>
41+
<!--textbox-->
42+
<SolidColorBrush x:Key="ThemeTextBoxBackground" Color="#FF333337"/>
3343

3444
<!--search-->
3545
<SolidColorBrush x:Key="ThemeSearchPlaceholder" Color="#7F919191"/>
@@ -38,28 +48,20 @@
3848
<SolidColorBrush x:Key="ThemeSearchForeground" Color="#FFC7C7C7"/>
3949
<SolidColorBrush x:Key="ThemeSearchSelection" Color="#FF003966"/>
4050

41-
<!--window-->
42-
<SolidColorBrush x:Key="ThemeWindowMinClose" Color="#FFC3C3C3"/>
43-
44-
<!--datagrids-->
45-
<SolidColorBrush x:Key="ThemeGridForeground" Color="#FFD8D8D8"/>
46-
<SolidColorBrush x:Key="ThemeGridHorizontalGridLines" Color="#4C000000"/>
47-
<SolidColorBrush x:Key="ThemeGridVerticalGridLines" Color="#19000000"/>
48-
<SolidColorBrush x:Key="ThemeGridGreenText" Color="#FF00C500"/>
49-
<SolidColorBrush x:Key="ThemeGridRedText" Color="#FFF54F4F"/>
50-
5151
<!--statusbar-->
5252
<SolidColorBrush x:Key="ThemeStatusText" Color="#FF595959"/>
5353

54-
<!--platform selection combobox-->
54+
<!--combobox-->
5555
<SolidColorBrush x:Key="ThemeDropDownBorderBorderBrush" Color="#FF171717"/>
5656
<SolidColorBrush x:Key="ThemeDropDownBorderBackground" Color="#FF2E2E34"/>
5757

58-
<SolidColorBrush x:Key="ThemeButtonFocusOutline" Color="#FF003D61"/>
59-
<SolidColorBrush x:Key="ThemeSystemHighlight" Color="#FF0078D7"/>
58+
<!--radio and checkboxes-->
6059
<SolidColorBrush x:Key="ThemeRadioButtonSelected" Color="#FF1E1E1E"/>
6160
<SolidColorBrush x:Key="ThemeRadioButtonOutline" Color="#FF1E1E1E"/>
62-
<SolidColorBrush x:Key="ThemeRadioButtonBackground" Color="#FFFFFFFF"/>
63-
61+
<SolidColorBrush x:Key="ThemeRadioCheckBoxBackground" Color="#FFFFFFFF"/>
62+
63+
<!--common-->
64+
<SolidColorBrush x:Key="ThemeButtonFocusOutline" Color="#FF003D61"/>
65+
<SolidColorBrush x:Key="ThemeSystemHighlight" Color="#FF0078D7"/>
6466

6567
</ResourceDictionary>

0 commit comments

Comments
 (0)