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

Minor changes to share output #886

Merged
Merged
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
6 changes: 3 additions & 3 deletions src/Calculator/Resources/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -3912,15 +3912,15 @@
<comment>Used on the dismiss button of the share action error dialog.</comment>
</data>
<data name="ShareActionTitle" xml:space="preserve">
<value>Look what I graphed.</value>
<value>Look what I graphed with Windows Calculator</value>
<comment>Sent as part of the shared content. The title for the share.</comment>
</data>
<data name="EquationsShareHeader" xml:space="preserve">
<value>Equations:</value>
<value>Equations</value>
<comment>Header that appears over the equations section when sharing</comment>
</data>
<data name="VariablesShareHeader" xml:space="preserve">
<value>Variables:</value>
<value>Variables</value>
<comment>Header that appears over the variables section when sharing</comment>
</data>
<data name="GraphImageAltText" xml:space="preserve">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void GraphingCalculator::OnDataRequested(DataTransferManager ^ sender, DataReque
equationHtml << L"<span style=\"color: rgb(68, 114, 196); font-style: bold; font-size : 13pt;\">";
equationHtml << resourceLoader->GetString(L"EquationsShareHeader")->Data();
equationHtml << L"</span>";
equationHtml << L"<table cellpadding=\"0\">";
equationHtml << L"<table cellpadding=\"0\" cellspacing=\"0\" >";

for (auto equation : equations)
{
Expand All @@ -237,8 +237,8 @@ void GraphingCalculator::OnDataRequested(DataTransferManager ^ sender, DataReque
equationColorHtml << L"color:rgb(" << color.R.ToString()->Data() << L"," << color.G.ToString()->Data() << L"," << color.B.ToString()->Data()
<< L");";

equationHtml << L"<tr><td><span style=\"line-height: 0; font-size: 24pt;" << equationColorHtml.str()
<< L"\">&#x25A0;</span></td><td><div style=\"margin: 4pt 0pt 0pt 0pt; \">";
equationHtml << L"<tr style=\"margin: 0pt 0pt 0pt 0pt; padding: 0pt 0pt 0pt 0pt; \"><td><span style=\"font-size: 22pt; line-height: 0;" << equationColorHtml.str()
<< L"\">&#x25A0;</span></td><td><div style=\"margin: 4pt 0pt 0pt 6pt;\">";
equationHtml << EscapeHtmlSpecialCharacters(expression)->Data();
equationHtml << L"</div></td>";
}
Expand All @@ -256,9 +256,9 @@ void GraphingCalculator::OnDataRequested(DataTransferManager ^ sender, DataReque
{
auto localizedSeperator = LocalizationSettings::GetInstance().GetListSeparator() + L" ";

rawHtml << L"<span style=\"color: rgb(68, 114, 196); font-style: bold; font-size: 13pt;\">";
rawHtml << L"<br><span style=\"color: rgb(68, 114, 196); font-style: bold; font-size: 13pt;\">";
rawHtml << resourceLoader->GetString(L"VariablesShareHeader")->Data();
rawHtml << L"</span><br><span>";
rawHtml << L"</span><br><div style=\"margin: 4pt 0pt 0pt 0pt;\">";

for (unsigned i = 0; i < variables->Size; i++)
{
Expand All @@ -277,7 +277,7 @@ void GraphingCalculator::OnDataRequested(DataTransferManager ^ sender, DataReque
}
}

rawHtml << L"</span>";
rawHtml << L"</div>";
}

rawHtml << L"<br><br>";
Expand Down