Skip to content

Commit 21c92ae

Browse files
committed
embed application.config, add disabled button style,
1 parent d6074d8 commit 21c92ae

File tree

3 files changed

+35
-30
lines changed

3 files changed

+35
-30
lines changed

UnityLauncherPro/MainWindow.xaml

+31-26
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,25 @@
9898
<Style x:Key="CustomButton" TargetType="{x:Type Button}">
9999
<Setter Property="SnapsToDevicePixels" Value="true"/>
100100
<Setter Property="OverridesDefaultStyle" Value="true"/>
101+
<Setter Property="Background" Value="{DynamicResource ButtonBackground}"/>
102+
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}"/>
101103
<Setter Property="Template">
102104
<Setter.Value>
103105
<ControlTemplate TargetType="{x:Type Button}">
104106
<Border x:Name="shortcutbutton" BorderThickness="0" BorderBrush="Black" Background="{TemplateBinding Background}">
105107
<ContentPresenter Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True"/>
106108
</Border>
107109
<ControlTemplate.Triggers>
110+
<Trigger Property="IsEnabled" Value="False">
111+
<Setter Property="Foreground" Value="#FF707070" />
112+
</Trigger>
108113
<Trigger Property="IsMouseOver" Value="true">
109114
<Setter TargetName="shortcutbutton" Property="Background" Value="#FF494949" />
110-
<!--<Setter Property="TextElement.Foreground" TargetName="shortcutbutton" Value="Blue"/>-->
115+
<Setter Property="TextElement.Foreground" TargetName="shortcutbutton" Value="White"/>
111116
</Trigger>
112117
<Trigger Property="IsPressed" Value="true">
113118
<Setter TargetName="shortcutbutton" Property="Background" Value="#FF0F0F0F" />
114-
<!--<Setter Property="TextElement.Foreground" TargetName="shortcutbutton" Value="Red"/>-->
119+
<Setter Property="TextElement.Foreground" TargetName="shortcutbutton" Value="White"/>
115120
</Trigger>
116121
</ControlTemplate.Triggers>
117122
</ControlTemplate>
@@ -244,10 +249,10 @@
244249
<Label Content="UnityLauncherPro" IsHitTestVisible="False" Margin="19,0,0,-5" Foreground="#FFB8B8B8" FontSize="12" HorizontalAlignment="Left" />
245250
<!-- minimize -->
246251
<Button x:Name="btnMinimize" BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" HorizontalAlignment="Right" VerticalAlignment="Top" Height="23" Width="23" Background="Transparent" Click="BtnMinimize_Click" Margin="0,0,27,0" Padding="2,0,2,8" IsTabStop="False">
247-
<TextBlock Text="" FontSize="15" Foreground="#FFC3C3C3" Padding="0" Height="23" HorizontalAlignment="Center"/>
252+
<TextBlock Text="" FontSize="15" Foreground="#FFC3C3C3" Padding="0" Height="23" HorizontalAlignment="Center"/>
248253
</Button>
249254
<!-- close -->
250-
<Button x:Name="btnClose" BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" HorizontalAlignment="Right" VerticalAlignment="Top" Height="23" Width="23" Background="Transparent" Click="BtnClose_Click" Padding="0,2" IsTabStop="False">
255+
<Button x:Name="btnClose" BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" HorizontalAlignment="Right" VerticalAlignment="Top" Height="23" Width="23" Background="Transparent" Click="BtnClose_Click" Padding="0,2" IsTabStop="False">
251256
<TextBlock Text="" FontSize="10" Foreground="#FFC3C3C3" Padding="5,3,4,4" HorizontalAlignment="Center" />
252257
</Button>
253258
</Grid>
@@ -374,18 +379,18 @@
374379
<RowDefinition Height="32" />
375380
</Grid.RowDefinitions>
376381
<Button Grid.Column="0" Style="{StaticResource CustomButton}" x:Name="btnUpgradeProject" Background="{DynamicResource ButtonBackground}" Foreground="#FFC1C1C1" Margin="5,0,0,0" BorderBrush="{x:Null}" Click="BtnUpgradeProject_Click">
377-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Upgrade"/>
382+
<Label Content="_Upgrade" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
378383
</Button>
379384
<Button Grid.Column="1" Style="{StaticResource CustomButton}" x:Name="btnLaunchUnity" Background="{DynamicResource ButtonBackground}" Foreground="#FFC1C1C1" Margin="8,0,0,0" BorderBrush="{x:Null}" Click="BtnLaunchUnity_Click" >
380-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Run Unity"/>
385+
<Label Content="_Run Unity" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
381386
</Button>
382387

383388
<Button Grid.Column="2" Style="{StaticResource CustomButton}" x:Name="btnLaunchProject" Background="{DynamicResource ButtonBackground}" Foreground="#FFC1C1C1" Margin="8,0,0,0" BorderBrush="{x:Null}" Click="BtnLaunchProject_Click" >
384-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Open Project"/>
389+
<Label Content="_Open Project" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
385390
</Button>
386391

387392
<Button Grid.Column="3" Style="{StaticResource CustomButton}" x:Name="btnExplore" Background="{DynamicResource ButtonBackground}" Foreground="#FFC1C1C1" Margin="8,0,0,0" BorderBrush="{x:Null}" Click="BtnExplore_Click" >
388-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Explore"/>
393+
<Label Content="_Explore" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
389394
</Button>
390395
</Grid>
391396
</Grid>
@@ -452,16 +457,16 @@
452457
<RowDefinition Height="32" />
453458
</Grid.RowDefinitions>
454459
<Button Grid.Column="0" Style="{StaticResource CustomButton}" x:Name="btnReleaseNotes" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="5,0,0,0" BorderBrush="{x:Null}" Click="BtnReleaseNotes_Click">
455-
<Label Foreground="{DynamicResource ButtonForeground}" Content="Release Notes"/>
460+
<Label Content="Release Notes" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
456461
</Button>
457462
<Button Grid.Column="1" Style="{StaticResource CustomButton}" x:Name="btnUpdateUnity" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="8,0,0,0" BorderBrush="{x:Null}" Click="BtnUpdateUnity_Click">
458-
<Label Foreground="{DynamicResource ButtonForeground}" Content="Update"/>
463+
<Label Content="Update" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
459464
</Button>
460465
<Button Grid.Column="2" Style="{StaticResource CustomButton}" x:Name="btnRunUnity" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="8,0,0,0" BorderBrush="{x:Null}" Click="BtnRunUnity_Click" >
461-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Run Unity"/>
466+
<Label Content="_Run Unity" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
462467
</Button>
463468
<Button Grid.Column="3" Style="{StaticResource CustomButton}" x:Name="btnExploreUnity" Background="{DynamicResource ButtonBackground}" Margin="8,0,0,0" BorderBrush="{x:Null}" Foreground="{DynamicResource ButtonForeground}" Click="BtnExploreUnity_Click" >
464-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Explore"/>
469+
<Label Content="_Explore" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
465470
</Button>
466471

467472
</Grid>
@@ -534,10 +539,10 @@
534539
<RowDefinition Height="32" />
535540
</Grid.RowDefinitions>
536541
<Button Grid.Column="0" Style="{StaticResource CustomButton}" x:Name="btnDonwloadInBrowser" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="5,0,0,0" BorderBrush="{x:Null}" Click="BtnDonwloadInBrowser_Click">
537-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Download in browser"/>
542+
<Label Content="_Download in browser" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
538543
</Button>
539544
<Button Grid.Column="1" Style="{StaticResource CustomButton}" x:Name="btnOpenWebsite" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="8,0,0,0" BorderBrush="{x:Null}" Click="BtnOpenWebsite_Click" >
540-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Release Notes"/>
545+
<Label Content="_Release Notes" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
541546
</Button>
542547
</Grid>
543548
</Grid>
@@ -557,17 +562,17 @@
557562
<Grid Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Left">
558563
<Border>
559564
<StackPanel Orientation="Horizontal" Margin="10">
560-
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenEditorLogsFolder" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenEditorLogsFolder_Click">
561-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Editor Logs"/>
565+
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenEditorLogsFolder" Margin="0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenEditorLogsFolder_Click" ToolTip="Open Editor logs folder in Explorer">
566+
<Label Content="_Editor Logs" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
562567
</Button>
563-
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenPlayerLogs" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenPlayerLogs_Click">
564-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Player Logs"/>
568+
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenPlayerLogs" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenPlayerLogs_Click" ToolTip="Open Player logs folder in Explorer">
569+
<Label Content="_Player Logs" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
565570
</Button>
566-
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenADBLogCat" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenADBLogCat_Click">
567-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_ADB logcat"/>
571+
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenADBLogCat" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenADBLogCat_Click" ToolTip="Start ADB logcat commandline">
572+
<Label Content="_ADB logcat" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
568573
</Button>
569-
<Button Style="{StaticResource CustomButton}" x:Name="btnAdbBindWifi" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnAdbBindWifi_Click">
570-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Bind Wifi"/>
574+
<Button Style="{StaticResource CustomButton}" x:Name="btnAdbBindWifi" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnAdbBindWifi_Click" IsEnabled="False" ToolTip="Bind Android device to wireless ADB">
575+
<Label Content="_Bind Wifi" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
571576
</Button>
572577
</StackPanel>
573578
</Border>
@@ -601,10 +606,10 @@
601606
<!-- locations add/remove -->
602607
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0" >
603608
<Button Style="{StaticResource CustomButton}" x:Name="btnAddInstallationFolder" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="5,4,0,3" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Click="BtnAddInstallationFolder_Click" Width="116">
604-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Add Folder"/>
609+
<Label Content="_Add Folder" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
605610
</Button>
606611
<Button Style="{StaticResource CustomButton}" x:Name="btnRemoveInstallationFolder" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="5,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Click="BtnRemoveInstallationFolder_Click">
607-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_Remove Folder"/>
612+
<Label Content="_Remove Folder" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
608613
</Button>
609614
</StackPanel>
610615
<!-- settings-->
@@ -618,8 +623,8 @@
618623
</StackPanel>
619624

620625
<!-- links-->
621-
<Button Grid.Row="4" Style="{StaticResource CustomButton}" x:Name="btnOpenGithub" Background="{DynamicResource ButtonBackground}" Foreground="{DynamicResource ButtonForeground}" Margin="10,0,0,10" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Click="BtnOpenGithub_Click">
622-
<Label Foreground="{DynamicResource ButtonForeground}" Content="_View in Github"/>
626+
<Button Grid.Row="4" Style="{StaticResource CustomButton}" x:Name="btnOpenGithub" Margin="10,0,0,10" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Click="BtnOpenGithub_Click">
627+
<Label Content="_View in Github" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
623628
</Button>
624629

625630
</Grid>

UnityLauncherPro/Properties/AssemblyInfo.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyTitle("UnityLauncherPro")]
1111
[assembly: AssemblyDescription("")]
1212
[assembly: AssemblyConfiguration("")]
13-
[assembly: AssemblyCompany("")]
13+
[assembly: AssemblyCompany("UnityCoder.com")]
1414
[assembly: AssemblyProduct("UnityLauncherPro")]
1515
[assembly: AssemblyCopyright("Copyright © 2019")]
1616
[assembly: AssemblyTrademark("")]
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.0.0.0")]
55-
[assembly: AssemblyFileVersion("1.0.0.0")]
54+
[assembly: AssemblyVersion("1.0.0.1")]
55+
[assembly: AssemblyFileVersion("1.0.0.1")]

UnityLauncherPro/UnityLauncherPro.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
</None>
132132
</ItemGroup>
133133
<ItemGroup>
134-
<None Include="App.config" />
134+
<Resource Include="App.config" />
135135
</ItemGroup>
136136
<ItemGroup>
137137
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">

0 commit comments

Comments
 (0)