Skip to content

Commit

Permalink
3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sh0ckj0ckey committed Aug 30, 2023
1 parent 90c0565 commit b3892a3
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Colors.Rainbow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<AppxPackageDir>C:\Users\Shock Jockey\Desktop\</AppxPackageDir>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x64|arm64</AppxBundlePlatforms>
<PackageCertificateThumbprint>5A0BF8439709A49B4461A62D501B413C3C6D9293</PackageCertificateThumbprint>
<PackageCertificateThumbprint>04D8CC40A318924D78CF923787628717EAA8188E</PackageCertificateThumbprint>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppInstallerUpdateFrequency>0</AppInstallerUpdateFrequency>
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>
Expand Down
6 changes: 3 additions & 3 deletions MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
<muxc:NavigationView.MenuItems>
<muxc:NavigationViewItem IsSelected="True" Height="64" Width="68" Tag="windows" FocusVisualPrimaryThickness="0" FocusVisualSecondaryThickness="0">
<muxc:NavigationViewItem.Content>
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}" Glyph="&#xE10F;" FontSize="20" Margin="-4,0,4,0"/>
<FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE10F;" FontSize="20" Margin="-4,0,4,0"/>
</muxc:NavigationViewItem.Content>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem Height="64" Width="68" Tag="palette" FocusVisualPrimaryThickness="0" FocusVisualSecondaryThickness="0">
<muxc:NavigationViewItem.Content>
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}" Glyph="&#xE790;" FontSize="18" Margin="-4,0,4,0"/>
<FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE790;" FontSize="18" Margin="-4,0,4,0"/>
</muxc:NavigationViewItem.Content>
</muxc:NavigationViewItem>
</muxc:NavigationView.MenuItems>
<muxc:NavigationView.FooterMenuItems>
<muxc:NavigationViewItem Height="64" Width="68" Tag="settings" FocusVisualPrimaryThickness="0" FocusVisualSecondaryThickness="0">
<muxc:NavigationViewItem.Content>
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}" Glyph="&#xE946;" FontSize="18" Margin="-4,0,4,0"/>
<FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE946;" FontSize="18" Margin="-4,0,4,0"/>
</muxc:NavigationViewItem.Content>
</muxc:NavigationViewItem>
</muxc:NavigationView.FooterMenuItems>
Expand Down
6 changes: 3 additions & 3 deletions Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="22189NoMewing.Colors.Rainbow" Publisher="CN=E6D8FAFA-3EF4-4E47-B885-52144C67BFF5" Version="3.0.0.0" />
<Identity Name="22189NoMewing.Colors.Rainbow" Publisher="CN=E6D8FAFA-3EF4-4E47-B885-52144C67BFF5" Version="3.0.1.0" />
<mp:PhoneIdentity PhoneProductId="9169f391-498a-43a8-a52c-c41cd6ec8c5a" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Colors.Rainbow</DisplayName>
Expand All @@ -15,8 +15,8 @@
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="Colors.Rainbow.App">
<uap:VisualElements DisplayName="Colors.Rainbow" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="对于C#开发者,有时需要一些颜色,但很多时候你只能看到每个颜色的名字,却不能看到它究竟是什么样的颜色,所以使用这个应用可以预览Colors类中每个属性对应的颜色,或者RGB值对应的颜色,方便你挑选喜欢的颜色。" BackgroundColor="#5e3f25">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" ShortName="Colors.Rainbow" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
<uap:VisualElements DisplayName="Rainbow" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="对于C#开发者,有时需要一些颜色,但很多时候你只能看到每个颜色的名字,却不能看到它究竟是什么样的颜色,所以使用这个应用可以预览Colors类中每个属性对应的颜色,或者RGB值对应的颜色,方便你挑选喜欢的颜色。" BackgroundColor="#5e3f25">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" ShortName="Rainbow" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
<uap:ShowOn Tile="wide310x150Logo" />
Expand Down
47 changes: 26 additions & 21 deletions Views/ColorsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
</ScrollViewer>

<Grid x:Name="SearchBox" Padding="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Translation="0,0,32" CornerRadius="8" Margin="40,20,40,20" Shadow="{StaticResource CommonShadow}" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<TextBox BorderThickness="0" PlaceholderText="Find a color" TextChanged="OnSearchTextChanged"/>
<TextBox Height="38" Padding="38,9,8,0" FontWeight="Medium" BorderThickness="0" PlaceholderText="Find a color" TextChanged="OnSearchTextChanged"/>
<FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xF78B;" FontSize="14" Margin="14,0,0,0" Opacity="0.7" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</Grid>

<Grid x:Name="ColorInfoGrid" Visibility="Collapsed" HorizontalAlignment="Stretch" Background="Transparent">
Expand All @@ -51,7 +52,7 @@
<ThemeShadow x:Name="ColorInfoShadow"/>
</Grid.Resources>
<Grid x:Name="BackgroundGrid" Opacity="1" Background="#33000000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Tapped="OnClickHideInfo"/>
<Grid x:Name="InfoCardGrid" CornerRadius="8" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Width="420" HorizontalAlignment="Center" VerticalAlignment="Center" Shadow="{StaticResource ColorInfoShadow}" Translation="0,0,32">
<Grid x:Name="InfoCardGrid" CornerRadius="8" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Width="420" HorizontalAlignment="Center" VerticalAlignment="Center" Shadow="{StaticResource ColorInfoShadow}" Translation="0,0,64">
<Grid.RowDefinitions>
<RowDefinition Height="48"/>
<RowDefinition Height="Auto"/>
Expand All @@ -65,26 +66,30 @@
<Ellipse x:Name="InfoColor2Ellipse" Grid.Column="1" Grid.Row="0" Height="64" Width="64" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0.66"/>
<Ellipse x:Name="InfoColor3Ellipse" Grid.Column="2" Grid.Row="0" Height="64" Width="64" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0.33"/>
</StackPanel>
<StackPanel Grid.Row="2" Margin="0,0,0,18" Orientation="Horizontal">
<TextBlock Text="RGB" FontWeight="Medium" FontFamily="Consolas" Margin="20,0,12,0" VerticalAlignment="Center"/>
<StackPanel x:Name="RGBBarGrid" Orientation="Horizontal" Width="340" VerticalAlignment="Center" CornerRadius="6">
<Grid x:Name="RGrid" Height="12" Background="Red" CornerRadius="6,0,0,6">
<TextBlock Text="{x:Bind _viewModel.SelectedWinColor.RValue,Mode=OneWay}" FontSize="12" Foreground="White" FontWeight="Medium" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
<Grid x:Name="GGrid" Height="12" Background="Green">
<TextBlock Text="{x:Bind _viewModel.SelectedWinColor.GValue,Mode=OneWay}" FontSize="12" Foreground="White" FontWeight="Medium" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
<Grid x:Name="BGrid" Height="12" Background="Blue" CornerRadius="0,6,6,0">
<TextBlock Text="{x:Bind _viewModel.SelectedWinColor.BValue,Mode=OneWay}" FontSize="12" Foreground="White" FontWeight="Medium" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="3" Margin="0,0,0,24" Orientation="Horizontal">
<TextBlock Text="HEX" FontWeight="Medium" FontFamily="Consolas" Margin="20,0,12,0" VerticalAlignment="Center"/>
<TextBox Text="{x:Bind _viewModel.SelectedWinColor.Hex,Mode=OneWay}" FontFamily="Consolas" Height="32" Width="96" BorderThickness="0" HorizontalAlignment="Left" Padding="12,8,4,0" Margin="0,0,0,0" IsReadOnly="True" VerticalContentAlignment="Center"/>
<Button x:Name="CopyButton" Grid.Row="4" Height="32" Margin="8,0,8,0" Click="CopyButton_Click">
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" FontSize="12" Text="&#xE16F;"/>
<Border Grid.Row="2" Grid.RowSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{ThemeResource ApplicationForegroundThemeBrush}" Opacity="0.05"/>
<StackPanel Grid.Row="2" Margin="20,20,20,20" Orientation="Vertical" Spacing="4" HorizontalAlignment="Stretch" VerticalAlignment="Center">
<Grid HorizontalAlignment="Stretch">
<TextBlock Text="R" Opacity="0.7" FontWeight="Medium" FontFamily="Consolas" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<TextBlock Text="{x:Bind _viewModel.SelectedWinColor.RValue,Mode=OneWay}" FontWeight="Medium" FontFamily="Consolas" HorizontalAlignment="Right" VerticalAlignment="Center"/>
</Grid>
<muxc:ProgressBar Value="{x:Bind _viewModel.SelectedWinColor.RValue,Mode=OneWay}" Maximum="255" Minimum="0" Foreground="Red" HorizontalAlignment="Stretch"/>

<Grid HorizontalAlignment="Stretch">
<TextBlock Text="G" Opacity="0.7" FontWeight="Medium" FontFamily="Consolas" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<TextBlock Text="{x:Bind _viewModel.SelectedWinColor.GValue,Mode=OneWay}" FontWeight="Medium" FontFamily="Consolas" HorizontalAlignment="Right" VerticalAlignment="Center"/>
</Grid>
<muxc:ProgressBar Value="{x:Bind _viewModel.SelectedWinColor.GValue,Mode=OneWay}" Maximum="255" Minimum="0" Foreground="Green" HorizontalAlignment="Stretch"/>

<Grid HorizontalAlignment="Stretch">
<TextBlock Text="B" Opacity="0.7" FontWeight="Medium" FontFamily="Consolas" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<TextBlock Text="{x:Bind _viewModel.SelectedWinColor.BValue,Mode=OneWay}" FontWeight="Medium" FontFamily="Consolas" HorizontalAlignment="Right" VerticalAlignment="Center"/>
</Grid>
<muxc:ProgressBar Value="{x:Bind _viewModel.SelectedWinColor.BValue,Mode=OneWay}" Maximum="255" Minimum="0" Foreground="Blue" HorizontalAlignment="Stretch"/>

<Button x:Name="CopyButton" Margin="0,10,0,0" HorizontalAlignment="Stretch" Click="CopyButton_Click">
<TextBlock Text="{x:Bind _viewModel.SelectedWinColor.Hex,Mode=OneWay}" CharacterSpacing="96"/>
</Button>

</StackPanel>
</Grid>
</Grid>
Expand Down
5 changes: 0 additions & 5 deletions Views/ColorsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ public void ShowColorInfo()
InfoColor2Ellipse.Fill = solidColorBrush;
InfoColor3Ellipse.Fill = solidColorBrush;

double total = RainbowViewModel.Instance.SelectedWinColor.RValue + RainbowViewModel.Instance.SelectedWinColor.GValue + RainbowViewModel.Instance.SelectedWinColor.BValue;
RGrid.Width = total > 0 ? (RainbowViewModel.Instance.SelectedWinColor.RValue / total) * RGBBarGrid.Width : 16;
GGrid.Width = total > 0 ? (RainbowViewModel.Instance.SelectedWinColor.GValue / total) * RGBBarGrid.Width : 16;
BGrid.Width = total > 0 ? (RainbowViewModel.Instance.SelectedWinColor.BValue / total) * RGBBarGrid.Width : 16;

ColorInfoGrid.Visibility = Visibility.Visible;
ShowGridAnim.Begin();
}
Expand Down

0 comments on commit b3892a3

Please sign in to comment.