Skip to content

Commit

Permalink
Feature: Added app name to the splash screen (#13594)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x5bfa authored and yaira2 committed Oct 30, 2023
1 parent dff8f65 commit e593674
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
42 changes: 32 additions & 10 deletions src/Files.App/Views/SplashScreenPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,38 @@
mc:Ignorable="d">

<Grid>
<Image
x:Name="MainSplashScreenImage"
Width="420"
ImageFailed="Image_ImageFailed"
ImageOpened="Image_ImageOpened"
Source="\Assets\AppTiles\Dev\SplashScreen.png" />
<!-- Splash Screen Image -->
<Viewbox
x:Name="SplashScreenImageViewbox"
Width="620"
Height="300"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="None">
<Image
x:Name="SplashScreenImage"
ImageFailed="Image_ImageFailed"
ImageOpened="Image_ImageOpened"
Source="\Assets\AppTiles\Dev\SplashScreen.png" />
</Viewbox>

<!-- Branch Label -->
<TextBlock
x:Name="SplashScreenBranchLabel"
Margin="0,164,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="20"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
LineHeight="32">
<Run FontWeight="SemiBold" Text="Files" />
<Run FontWeight="SemiLight" Text="Preview" />
</TextBlock>

<!-- Loading Indicator -->
<ProgressRing
x:Name="MainProgressRing"
Margin="0,0,0,88"
x:Name="SplashScreenLoadingProgressRing"
Margin="0,0,0,48"
VerticalAlignment="Bottom"
Foreground="{ThemeResource ApplicationForegroundThemeBrush}"
IsIndeterminate="True" />
Expand All @@ -27,10 +49,10 @@
<VisualStateGroup x:Name="SizeChangesState">
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="640" />
<AdaptiveTrigger MinWindowHeight="500" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="MainSplashScreenImage.Width" Value="480" />
<Setter Target="SplashScreenLoadingProgressRing.Margin" Value="0,0,0,88" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
Expand Down
8 changes: 8 additions & 0 deletions src/Files.App/Views/SplashScreenPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ namespace Files.App.Views
/// </summary>
public sealed partial class SplashScreenPage : Page
{
private string BranchLabel =>
ApplicationService.AppEnvironment switch
{
AppEnvironment.Dev => "Dev",
AppEnvironment.Preview => "Preview",
_ => string.Empty,
};

public SplashScreenPage()
{
InitializeComponent();
Expand Down

0 comments on commit e593674

Please sign in to comment.