|
12 | 12 | <vm:MainWindowViewModel /> |
13 | 13 | </Design.DataContext> |
14 | 14 |
|
| 15 | + <UserControl.Styles> |
| 16 | + <Style Selector="Border.launcher-update-card"> |
| 17 | + <Setter Property="Background" Value="{DynamicResource ThemePopupBackgroundColor}" /> |
| 18 | + <Setter Property="BorderBrush" Value="#607A91A8" /> |
| 19 | + <Setter Property="BorderThickness" Value="1.5" /> |
| 20 | + <Setter Property="CornerRadius" Value="16" /> |
| 21 | + <Setter Property="Padding" Value="16" /> |
| 22 | + <Setter Property="MinWidth" Value="620" /> |
| 23 | + <Setter Property="MaxWidth" Value="860" /> |
| 24 | + </Style> |
| 25 | + |
| 26 | + <Style Selector="Border.launcher-update-hero"> |
| 27 | + <Setter Property="Background" Value="#2A3E6C45" /> |
| 28 | + <Setter Property="BorderBrush" Value="#7A8E94B8" /> |
| 29 | + <Setter Property="BorderThickness" Value="1" /> |
| 30 | + <Setter Property="CornerRadius" Value="12" /> |
| 31 | + <Setter Property="Padding" Value="12,10" /> |
| 32 | + </Style> |
| 33 | + |
| 34 | + <Style Selector="Border.launcher-update-section"> |
| 35 | + <Setter Property="Background" Value="#20000000" /> |
| 36 | + <Setter Property="BorderBrush" Value="#406B6F8F" /> |
| 37 | + <Setter Property="BorderThickness" Value="1" /> |
| 38 | + <Setter Property="CornerRadius" Value="10" /> |
| 39 | + <Setter Property="Padding" Value="12" /> |
| 40 | + </Style> |
| 41 | + |
| 42 | + <Style Selector="Border.launcher-update-channel"> |
| 43 | + <Setter Property="Padding" Value="10,3" /> |
| 44 | + <Setter Property="CornerRadius" Value="10" /> |
| 45 | + </Style> |
| 46 | + </UserControl.Styles> |
| 47 | + |
15 | 48 | <Panel> |
16 | 49 | <DockPanel LastChildFill="true"> |
17 | 50 | <!-- Header --> |
|
97 | 130 | </StackPanel> |
98 | 131 | </ContentControl> |
99 | 132 |
|
100 | | - <ContentControl Classes="OverlayBox" IsVisible="{Binding LauncherUpdateAvailable}"> |
101 | | - <StackPanel Orientation="Vertical" Spacing="10"> |
102 | | - <TextBlock HorizontalAlignment="Center" Classes="NanoHeadingMedium" Text="{loc:Loc launcher-update-overlay-title}" /> |
103 | | - <TextBlock TextAlignment="Center" Text="{Binding LauncherUpdateVersionLine}" /> |
104 | | - <StackPanel IsVisible="{Binding LauncherUpdateNotes, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" |
105 | | - Spacing="4" MaxWidth="620"> |
106 | | - <TextBlock Text="{loc:Loc launcher-update-overlay-notes}" FontWeight="SemiBold" /> |
107 | | - <ScrollViewer MaxHeight="220" HorizontalScrollBarVisibility="Disabled"> |
108 | | - <TextBlock Text="{Binding LauncherUpdateNotes}" TextWrapping="Wrap" /> |
109 | | - </ScrollViewer> |
110 | | - </StackPanel> |
111 | | - <TextBlock IsVisible="{Binding LauncherUpdateError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" |
112 | | - Text="{Binding LauncherUpdateError}" TextWrapping="Wrap" MaxWidth="520" Foreground="#FF8A8A" /> |
| 133 | + <ContentControl Classes="OverlayBox" |
| 134 | + Background="Transparent" |
| 135 | + BorderBrush="Transparent" |
| 136 | + IsVisible="{Binding LauncherUpdateAvailable}"> |
| 137 | + <Border Classes="launcher-update-card"> |
| 138 | + <StackPanel Orientation="Vertical" Spacing="10"> |
| 139 | + <Border Classes="launcher-update-hero"> |
| 140 | + <Grid RowDefinitions="Auto,Auto" ColumnDefinitions="*,Auto"> |
| 141 | + <TextBlock Grid.Row="0" |
| 142 | + Grid.Column="0" |
| 143 | + Classes="NanoHeadingMedium" |
| 144 | + FontWeight="SemiBold" |
| 145 | + Margin="0,0,8,4" |
| 146 | + Text="{loc:Loc launcher-update-overlay-title}" /> |
| 147 | + <Border Grid.Row="0" |
| 148 | + Grid.Column="1" |
| 149 | + Classes="launcher-update-channel" |
| 150 | + Background="{Binding LauncherUpdateChannelBadgeBackground}" |
| 151 | + Margin="0,0,0,4" |
| 152 | + IsVisible="{Binding LauncherUpdateChannelText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"> |
| 153 | + <TextBlock Text="{Binding LauncherUpdateChannelText}" |
| 154 | + FontSize="10" |
| 155 | + FontWeight="SemiBold" |
| 156 | + Foreground="{Binding LauncherUpdateChannelBadgeForeground}" /> |
| 157 | + </Border> |
| 158 | + <TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding LauncherUpdateVersionLine}" Opacity="0.85" /> |
| 159 | + </Grid> |
| 160 | + </Border> |
113 | 161 |
|
114 | | - <StackPanel IsVisible="{Binding LauncherUpdateInProgress}" Spacing="6"> |
115 | | - <ProgressBar Minimum="0" Maximum="1" Value="{Binding LauncherUpdateProgress}" Width="460" HorizontalAlignment="Center"/> |
116 | | - <TextBlock Text="{Binding LauncherUpdateProgressText}" HorizontalAlignment="Center" /> |
117 | | - </StackPanel> |
| 162 | + <Border Classes="launcher-update-section" |
| 163 | + IsVisible="{Binding LauncherUpdateNotes, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"> |
| 164 | + <StackPanel Spacing="6"> |
| 165 | + <TextBlock Text="{loc:Loc launcher-update-overlay-notes}" FontWeight="SemiBold" /> |
| 166 | + <ScrollViewer MaxHeight="280" HorizontalScrollBarVisibility="Disabled"> |
| 167 | + <TextBlock Text="{Binding LauncherUpdateNotes}" TextWrapping="Wrap" /> |
| 168 | + </ScrollViewer> |
| 169 | + </StackPanel> |
| 170 | + </Border> |
118 | 171 |
|
119 | | - <DockPanel LastChildFill="False" IsVisible="{Binding !LauncherUpdateInProgress}"> |
120 | | - <Button DockPanel.Dock="Right" |
121 | | - IsVisible="{Binding LauncherUpdateInstallSupported}" |
122 | | - Content="{loc:Loc launcher-update-overlay-install}" |
123 | | - Command="{Binding InstallLauncherUpdatePressed}" /> |
124 | | - <Button DockPanel.Dock="Right" |
125 | | - IsVisible="{Binding !LauncherUpdateInstallSupported}" |
126 | | - Content="{loc:Loc launcher-update-overlay-open-release}" |
127 | | - Command="{Binding OpenLauncherUpdatePagePressed}" /> |
128 | | - <Button DockPanel.Dock="Left" Content="{loc:Loc launcher-update-overlay-skip}" Command="{Binding SkipLauncherUpdatePressed}" /> |
129 | | - </DockPanel> |
130 | | - </StackPanel> |
| 172 | + <Border Classes="launcher-update-section" |
| 173 | + IsVisible="{Binding LauncherUpdateError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"> |
| 174 | + <TextBlock Text="{Binding LauncherUpdateError}" TextWrapping="Wrap" Foreground="#FF8A8A" /> |
| 175 | + </Border> |
| 176 | + |
| 177 | + <Border Classes="launcher-update-section" IsVisible="{Binding LauncherUpdateInProgress}"> |
| 178 | + <StackPanel Spacing="6"> |
| 179 | + <ProgressBar Minimum="0" Maximum="1" Value="{Binding LauncherUpdateProgress}" /> |
| 180 | + <TextBlock Text="{Binding LauncherUpdateProgressText}" Opacity="0.85" /> |
| 181 | + </StackPanel> |
| 182 | + </Border> |
| 183 | + |
| 184 | + <DockPanel LastChildFill="False" IsVisible="{Binding !LauncherUpdateInProgress}"> |
| 185 | + <Button DockPanel.Dock="Left" |
| 186 | + Content="{loc:Loc launcher-update-overlay-skip}" |
| 187 | + Command="{Binding SkipLauncherUpdatePressed}" /> |
| 188 | + <Button DockPanel.Dock="Right" |
| 189 | + IsVisible="{Binding LauncherUpdateInstallSupported}" |
| 190 | + Content="{loc:Loc launcher-update-overlay-install}" |
| 191 | + Command="{Binding InstallLauncherUpdatePressed}" /> |
| 192 | + <Button DockPanel.Dock="Right" |
| 193 | + IsVisible="{Binding !LauncherUpdateInstallSupported}" |
| 194 | + Content="{loc:Loc launcher-update-overlay-open-release}" |
| 195 | + Command="{Binding OpenLauncherUpdatePagePressed}" /> |
| 196 | + </DockPanel> |
| 197 | + </StackPanel> |
| 198 | + </Border> |
131 | 199 | </ContentControl> |
132 | 200 |
|
133 | 201 | <ContentControl Classes="OverlayBox" IsVisible="{Binding OutOfDate}"> |
|
0 commit comments