Skip to content

Commit

Permalink
修复向导页面 Java 运行图标
Browse files Browse the repository at this point in the history
  • Loading branch information
natsurainko committed Jul 14, 2024
1 parent 45b1e51 commit 3b1885a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<Border CornerRadius="4">
<WebView2
Height="300"
MinWidth="400"
HorizontalAlignment="Stretch"
Source="{Binding Source, Mode=TwoWay}">
<WebView2.Visibility>
Expand Down
1 change: 1 addition & 0 deletions Natsurainko.FluentLauncher/Views/OOBE/AccountPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<Grid
Grid.Column="2"
Width="300"
MaxHeight="275"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ListView
Expand Down
12 changes: 5 additions & 7 deletions Natsurainko.FluentLauncher/Views/OOBE/JavaPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<Grid
Grid.Column="2"
Width="300"
MaxHeight="275"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ListView ItemsSource="{Binding JavaRuntimes}" SelectedItem="{Binding ActiveJavaRuntime, Mode=TwoWay}">
Expand All @@ -90,13 +91,13 @@
<ListView.ItemTemplate>
<DataTemplate>
<Grid
Padding="0,7.5"
Padding="0,10"
Background="Transparent"
PointerEntered="Grid_PointerEntered"
PointerExited="Grid_PointerExited">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="7.5" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
Expand All @@ -106,12 +107,9 @@
Width="32"
Height="32"
VerticalAlignment="Center"
Source="/Assets/Icons/java_logo.png" />
Source="{Binding Converter={ThemeResource JavaIconConverter}}" />
<StackPanel Grid.Column="2">
<TextBlock
FontWeight="SemiBold"
Text="{Binding Converter={ThemeResource JavaInfoConverter}}"
TextTrimming="CharacterEllipsis" />
<TextBlock Text="{Binding Converter={ThemeResource JavaInfoConverter}}" TextTrimming="CharacterEllipsis" />
<TextBlock
Foreground="{ThemeResource ApplicationSecondaryForegroundThemeBrush}"
Style="{ThemeResource CaptionTextBlockStyle}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<Grid
Grid.Column="2"
Width="300"
MaxHeight="275"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ListView ItemsSource="{Binding MinecraftFolders}" SelectedItem="{Binding ActiveMinecraftFolder, Mode=TwoWay}">
Expand Down
4 changes: 3 additions & 1 deletion Natsurainko.FluentLauncher/Views/Settings/LaunchPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@
CommandParameter="{Binding}"
Description="{Binding}"
Header="{Binding Converter={ThemeResource JavaInfoConverter}}"
HeaderIcon="{Binding Converter={ThemeResource JavaIconConverter}}"
IsClickEnabled="True"
Loaded="Card_Loaded"
Tag="ActiveJava">
<controls:SettingsCard.HeaderIcon>
<ImageIcon Source="{Binding Converter={ThemeResource JavaIconConverter}}" />
</controls:SettingsCard.HeaderIcon>
<StackPanel
Name="Operations"
Orientation="Horizontal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public object Convert(object value, Type targetType, object parameter, string la
var bitmapImage = new BitmapImage();

_ = bitmapImage.SetSourceAsync(thumbnail);
return new ImageIcon() { Source = bitmapImage };
return bitmapImage;
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
Expand Down

0 comments on commit 3b1885a

Please sign in to comment.