Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings page is redesigned. #1984

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/Calculator/Resources/en-GB/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -2321,6 +2321,14 @@
<value>To learn how you can contribute to Windows Calculator, check out the project on %HL%GitHub%HL%.</value>
<comment>{Locked="%HL%GitHub%HL%"}. GitHub link, Displayed on the About panel</comment>
</data>
<data name="AboutCalculator.Text" xml:space="preserve">
<value>About Calculator</value>
<comment>Title of about information expander.</comment>
</data>
<data name="LearnMoreAboutCalculator.Text" xml:space="preserve">
<value>Learn more about Windows Calculator</value>
<comment>Label of about information expander.</comment>
</data>
<data name="AboutGroupTitle.Text" xml:space="preserve">
<value>About</value>
<comment>Subtitle of about message on Settings page</comment>
Expand Down Expand Up @@ -4166,4 +4174,4 @@
<value>App theme setting</value>
<comment>Screen reader prompt for the App theme Setting radio buttons group</comment>
</data>
</root>
</root>
10 changes: 9 additions & 1 deletion src/Calculator/Resources/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -2721,6 +2721,14 @@
<value>To learn how you can contribute to Windows Calculator, check out the project on %HL%GitHub%HL%.</value>
<comment>{Locked="%HL%GitHub%HL%"}. GitHub link, Displayed on the About panel</comment>
</data>
<data name="AboutCalculator.Text" xml:space="preserve">
<value>About Calculator</value>
<comment>Title of about information expander.</comment>
</data>
<data name="LearnMoreAboutCalculator.Text" xml:space="preserve">
<value>Learn more about Windows Calculator</value>
<comment>Label of about information expander.</comment>
</data>
<data name="AboutGroupTitle.Text" xml:space="preserve">
<value>About</value>
<comment>Subtitle of about message on Settings page</comment>
Expand Down Expand Up @@ -4738,4 +4746,4 @@
<value>App theme setting</value>
<comment>Screen reader prompt for the App theme Setting radio buttons group</comment>
</data>
</root>
</root>
12 changes: 10 additions & 2 deletions src/Calculator/Resources/tr-TR/Resources.resw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -2321,6 +2321,14 @@
<value>Windows hesap makinesi 'ne nasıl katkıda bulunabileceğinizi öğrenmek için %HL%GitHub%HL% projeyi kullanıma alın.</value>
<comment>{Locked="%HL%GitHub%HL%"}. GitHub link, Displayed on the About panel</comment>
</data>
<data name="AboutCalculator.Text" xml:space="preserve">
<value>Hesap Makinesi Hakkında</value>
<comment>Title of about information expander.</comment>
</data>
<data name="LearnMoreAboutCalculator.Text" xml:space="preserve">
<value>Windows Hesap Makinesi hakkında daha fazla bilgi edinin</value>
<comment>Label of about information expander.</comment>
</data>
<data name="AboutGroupTitle.Text" xml:space="preserve">
<value>Hakkında</value>
<comment>Subtitle of about message on Settings page</comment>
Expand Down Expand Up @@ -4166,4 +4174,4 @@
<value>Uygulama teması ayarları</value>
<comment>Screen reader prompt for the App theme Setting radio buttons group</comment>
</data>
</root>
</root>
109 changes: 76 additions & 33 deletions src/Calculator/Views/Settings.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,17 @@
<Grid.RowDefinitions>
<RowDefinition x:Name="AppearanceTitleRow" Height="Auto"/>
<RowDefinition x:Name="AppearanceExpanderRow" Height="Auto"/>
<RowDefinition x:Name="ContentTitleRow" Height="Auto"/>
<RowDefinition x:Name="ContentExpanderRow" Height="Auto"/>
<RowDefinition x:Name="FeedbackRow" Height="Auto"/>
<RowDefinition x:Name="AboutTitleContentRow" Height="*"/>
</Grid.RowDefinitions>

<TextBlock x:Uid="SettingsAppearance"
Style="{StaticResource BodyStrongTextBlockStyle}"
AutomationProperties.HeadingLevel="Level1"/>


<muxc:Expander x:Name="AppThemeExpander"
x:Uid="AppThemeExpander"
Grid.Row="1"
Expand Down Expand Up @@ -172,69 +176,106 @@
</muxc:RadioButtons>
</muxc:Expander.Content>
</muxc:Expander>

<TextBlock x:Uid="AboutGroupTitle"
Grid.Row="2"
Style="{StaticResource BodyStrongTextBlockStyle}"
AutomationProperties.HeadingLevel="Level1"/>

<Grid x:Name="AboutContentGrid" Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<muxc:Expander x:Name="AboutContentExpander"
x:Uid="AboutContentExpander"
Grid.Row="3"
Margin="0,8,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
HorizontalContentAlignment="Left"
ExpandDirection="Down"
IsExpanded="False">
<muxc:Expander.Header>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<BitmapIcon Margin="0,0,12,0"
VerticalAlignment="Center"
AutomationProperties.AccessibilityView="Raw"
Height="16"
Width="16"
UriSource="ms-appx:///Assets/CalculatorAppList.png"/>

<StackPanel Grid.Column="1"
Margin="0,12"
Orientation="Vertical">

<TextBlock x:Name="AboutGroupTitle"
x:Uid="AboutGroupTitle"
Margin="0,20,0,0"
Style="{ThemeResource BodyStrongTextBlockStyle}"
AutomationProperties.HeadingLevel="Level1"/>
<StackPanel Grid.Row="1"
<TextBlock x:Uid="AboutCalculator" Style="{StaticResource BodyTextBlockStyle}"/>

<TextBlock x:Uid="LearnMoreAboutCalculator"
Style="{StaticResource CaptionTextBlockStyle}"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
TextWrapping="WrapWholeWords"/>
</StackPanel>
</Grid>
</muxc:Expander.Header>
<muxc:Expander.Content>
<StackPanel Grid.Row="1"
Margin="0,8,0,0"
Orientation="Vertical">
<RichTextBlock x:Name="AboutContentBody" Style="{StaticResource SettingsRichTextBlockStyle}">
<Paragraph>
<Run x:Name="AboutBuildVersion"/>
<LineBreak/>
<Run x:Name="AboutControlCopyrightRun"/>
</Paragraph>
</RichTextBlock>

<HyperlinkButton x:Name="AboutEULA"
<TextBlock x:Name="AboutBuildVersion"
TextWrapping="WrapWholeWords"/>
<TextBlock x:Name="AboutControlCopyrightRun"
Style="{StaticResource CaptionTextBlockStyle}"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
TextWrapping="WrapWholeWords"/>
<HyperlinkButton x:Name="AboutEULA"
Margin="0,16,0,0"
Padding="0"
NavigateUri="https://go.microsoft.com/fwlink/?LinkID=529064"
ToolTipService.ToolTip="https://go.microsoft.com/fwlink/?LinkID=529064">
<TextBlock x:Uid="AboutEULA"
<TextBlock x:Uid="AboutEULA"
FontSize="{ThemeResource BodyFontSize}"
TextWrapping="Wrap"/>
</HyperlinkButton>
</HyperlinkButton>

<HyperlinkButton x:Name="AboutControlServicesAgreement"
<HyperlinkButton x:Name="AboutControlServicesAgreement"
Margin="0,16,0,0"
Padding="0"
NavigateUri="https://go.microsoft.com/fwlink/?LinkID=822631"
ToolTipService.ToolTip="https://go.microsoft.com/fwlink/?LinkID=822631">
<TextBlock x:Uid="AboutControlServicesAgreement"
<TextBlock x:Uid="AboutControlServicesAgreement"
FontSize="{ThemeResource BodyFontSize}"
TextWrapping="Wrap"/>
</HyperlinkButton>
</HyperlinkButton>

<HyperlinkButton x:Name="AboutControlPrivacyStatement"
<HyperlinkButton x:Name="AboutControlPrivacyStatement"
Margin="0,16,0,0"
Padding="0"
NavigateUri="https://go.microsoft.com/fwlink/?LinkID=521839"
ToolTipService.ToolTip="https://go.microsoft.com/fwlink/?LinkID=521839">
<TextBlock x:Uid="AboutControlPrivacyStatement"
<TextBlock x:Uid="AboutControlPrivacyStatement"
FontSize="{ThemeResource BodyFontSize}"
TextWrapping="Wrap"/>
</HyperlinkButton>
</HyperlinkButton>
</StackPanel>
</muxc:Expander.Content>
</muxc:Expander>


<Button x:Name="FeedbackButton"
<Button x:Name="FeedbackButton"
x:Uid="FeedbackButton"
Grid.Row="4"
MinWidth="120"
Margin="0,24,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontSize="{StaticResource BodyFontSize}"
Click="FeedbackButton_Click"/>
</StackPanel>

<Grid x:Name="AboutContributeGrid" Grid.Row="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<RichTextBlock x:Name="AboutContribute"
Grid.Row="2"
Margin="0,16,0,0"
Expand All @@ -244,13 +285,15 @@
Note: don't put Hyperlink element start to the next line
otherwise unexpected whitespace will be add.
-->
<Run x:Name="ContributeRunBeforeLink"/><Hyperlink Foreground="{x:Bind AboutEULA.Foreground, Mode=OneWay}"
<Run x:Name="ContributeRunBeforeLink"/>
<Hyperlink Foreground="{x:Bind AboutEULA.Foreground, Mode=OneWay}"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2099939"
TextDecorations="None"
ToolTipService.ToolTip="https://go.microsoft.com/fwlink/?linkid=2099939"
UnderlineStyle="None">
<Run x:Name="ContributeRunLink"/>
</Hyperlink><Run x:Name="ContributeRunAfterLink"/>
</Hyperlink>
<Run x:Name="ContributeRunAfterLink"/>
</Paragraph>
</RichTextBlock>
</Grid>
Expand Down
3 changes: 2 additions & 1 deletion src/Calculator/Views/Settings.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public Settings()
var copyrightText =
LocalizationStringUtil.GetLocalizedString(resourceLoader.GetResourceString("AboutControlCopyright"), BUILD_YEAR);
AboutControlCopyrightRun.Text = copyrightText;

InitializeContributeTextBlock();
}

Expand Down Expand Up @@ -109,6 +109,7 @@ private void SetVersionString()
{
PackageVersion version = Package.Current.Id.Version;
string appName = AppResourceProvider.GetInstance().GetResourceString("AppName");

AboutBuildVersion.Text = appName + " " + version.Major + "." + version.Minor + "." + version.Build + "." + version.Revision;
}

Expand Down
6 changes: 5 additions & 1 deletion src/CalculatorUnitTests/CalculatorUnitTests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,13 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="..\calculator\views\titlebar.xaml.cs" />
<None Include="WindowsDev_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Page Include="..\calculator\views\titlebar.xaml" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
4 changes: 4 additions & 0 deletions src/CalculatorUnitTests/CalculatorUnitTests.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,9 @@
</ItemGroup>
<ItemGroup>
<None Include="WindowsDev_TemporaryKey.pfx" />
<None Include="..\calculator\views\titlebar.xaml.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="..\calculator\views\titlebar.xaml" />
</ItemGroup>
</Project>