Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
natsurainko committed Sep 29, 2023
1 parent 5e2580a commit 202f6cd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Natsurainko.FluentLauncher/Views/Home/HomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xmlns:vm="using:Natsurainko.FluentLauncher.ViewModels.Home"
d:DataContext="{d:DesignInstance vm:HomeViewModel}"
Background="Transparent"
Loaded="Page_Loaded"
mc:Ignorable="d">

<Grid>
Expand Down Expand Up @@ -77,12 +78,16 @@
<ColumnDefinition Width="1*" MaxWidth="250" />
</Grid.ColumnDefinitions>
<Button
x:Name="LaunchButton"
Grid.Column="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Command="{Binding LaunchCommand}"
FontSize="16"
Style="{ThemeResource AccentButtonStyle}">
<ToolTipService.ToolTip>
<TextBlock x:Uid="Home_HomePage_LaunchButton" />
</ToolTipService.ToolTip>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down
5 changes: 5 additions & 0 deletions Natsurainko.FluentLauncher/Views/Home/HomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ public HomePage()
{
InitializeComponent();
}

private void Page_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
{
LaunchButton.Focus(Microsoft.UI.Xaml.FocusState.Programmatic);
}
}
7 changes: 7 additions & 0 deletions Natsurainko.FluentLauncher/Views/Home/NewHomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,16 @@
</HyperlinkButton>
</StackPanel>
<Button
x:Name="LaunchButton"
Grid.Column="4"
Command="{Binding LaunchCommand}"
Style="{ThemeResource AccentButtonStyle}">
<ToolTipService.ToolTip>
<TextBlock x:Uid="Home_HomePage_LaunchButton" />
</ToolTipService.ToolTip>
<Button.KeyboardAccelerators>
<KeyboardAccelerator Key="Enter" />
</Button.KeyboardAccelerators>
<Grid Margin="10,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
Expand Down
2 changes: 2 additions & 0 deletions Natsurainko.FluentLauncher/Views/Home/NewHomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ private void Button_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)

private void Page_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
{
LaunchButton.Focus(Microsoft.UI.Xaml.FocusState.Programmatic);

SharedShadow.Receivers.Add(BackgroundGrid);
PanelGrid.Translation += new System.Numerics.Vector3(0, 0, 48);
}
Expand Down

0 comments on commit 202f6cd

Please sign in to comment.