Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Nov 2, 2024
1 parent 14b9ec5 commit 78b2f9c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions JL.Windows/GUI/PopupWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
Grid pitchAccentGrid = PopupWindowUtils.CreatePitchAccentGrid(result.PrimarySpelling,
result.AlternativeSpellings,
null,
primarySpellingTextBlock.Text.Split(", "),
null,
primarySpellingTextBlock.Margin.Left,
pitchDict!,
result.PitchAccentDict);
Expand Down Expand Up @@ -586,7 +586,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
{
string readingsText = showROrthographyInfo && result.ReadingsOrthographyInfoList is not null
? LookupResultUtils.ElementWithOrthographyInfoToText(result.Readings, result.ReadingsOrthographyInfoList)
: string.Join(", ", result.Readings);
: string.Join('、', result.Readings);

if (MiningMode)
{
Expand All @@ -602,7 +602,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
Grid pitchAccentGrid = PopupWindowUtils.CreatePitchAccentGrid(result.PrimarySpelling,
result.AlternativeSpellings,
result.Readings,
readingTextBox.Text.Split(", "),
readingTextBox.Text.Split('、'),
readingTextBox.Margin.Left,
pitchDict!,
result.PitchAccentDict);
Expand Down Expand Up @@ -641,7 +641,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
Grid pitchAccentGrid = PopupWindowUtils.CreatePitchAccentGrid(result.PrimarySpelling,
result.AlternativeSpellings,
result.Readings,
readingTextBlock.Text.Split(", "),
readingTextBlock.Text.Split('、'),
readingTextBlock.Margin.Left,
pitchDict!,
result.PitchAccentDict);
Expand Down Expand Up @@ -691,7 +691,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
{
string alternativeSpellingsText = showAOrthographyInfo && result.AlternativeSpellingsOrthographyInfoList is not null
? LookupResultUtils.ElementWithOrthographyInfoToTextWithParentheses(result.AlternativeSpellings, result.AlternativeSpellingsOrthographyInfoList)
: $"({string.Join(", ", result.AlternativeSpellings)})";
: $"({string.Join('、', result.AlternativeSpellings)})";

if (MiningMode)
{
Expand Down Expand Up @@ -822,7 +822,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
if (MiningMode)
{
TextBox onReadingsTextBox = PopupWindowUtils.CreateTextBox(nameof(result.OnReadings),
$"On: {string.Join(", ", result.OnReadings)}",
$"On: {string.Join('、', result.OnReadings)}",
ConfigManager.DefinitionsColor,
ConfigManager.DefinitionsFontSize,
PopupContextMenu,
Expand All @@ -837,7 +837,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
else
{
TextBlock onReadingsTextBlock = PopupWindowUtils.CreateTextBlock(nameof(result.OnReadings),
$"On: {string.Join(", ", result.OnReadings)}",
$"On: {string.Join('、', result.OnReadings)}",
ConfigManager.DefinitionsColor,
ConfigManager.DefinitionsFontSize,
PopupContextMenu,
Expand All @@ -853,7 +853,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
if (MiningMode)
{
TextBox kunReadingsTextBox = PopupWindowUtils.CreateTextBox(nameof(result.KunReadings),
$"Kun: {string.Join(", ", result.KunReadings)}",
$"Kun: {string.Join('、', result.KunReadings)}",
ConfigManager.DefinitionsColor,
ConfigManager.DefinitionsFontSize,
PopupContextMenu,
Expand All @@ -868,7 +868,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
else
{
TextBlock kunReadingsTextBlock = PopupWindowUtils.CreateTextBlock(nameof(result.KunReadings),
$"Kun: {string.Join(", ", result.KunReadings)}",
$"Kun: {string.Join('、', result.KunReadings)}",
ConfigManager.DefinitionsColor,
ConfigManager.DefinitionsFontSize,
PopupContextMenu,
Expand All @@ -884,7 +884,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
if (MiningMode)
{
TextBox nanoriReadingsTextBox = PopupWindowUtils.CreateTextBox(nameof(result.NanoriReadings),
$"Nanori: {string.Join(", ", result.NanoriReadings)}",
$"Nanori: {string.Join('、', result.NanoriReadings)}",
ConfigManager.DefinitionsColor,
ConfigManager.DefinitionsFontSize,
PopupContextMenu,
Expand All @@ -899,7 +899,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
else
{
TextBlock nanoriReadingsTextBlock = PopupWindowUtils.CreateTextBlock(nameof(result.NanoriReadings),
$"Nanori: {string.Join(", ", result.NanoriReadings)}",
$"Nanori: {string.Join('、', result.NanoriReadings)}",
ConfigManager.DefinitionsColor,
ConfigManager.DefinitionsFontSize,
PopupContextMenu,
Expand All @@ -915,7 +915,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
if (MiningMode)
{
TextBox radicalNameTextBox = PopupWindowUtils.CreateTextBox(nameof(result.RadicalNames),
$"Radical names: {string.Join(", ", result.RadicalNames)}",
$"Radical names: {string.Join('、', result.RadicalNames)}",
ConfigManager.DefinitionsColor,
ConfigManager.DefinitionsFontSize,
PopupContextMenu,
Expand All @@ -930,7 +930,7 @@ private StackPanel PrepareResultStackPanel(LookupResult result, int index, int r
else
{
TextBlock radicalNameTextBlock = PopupWindowUtils.CreateTextBlock(nameof(result.RadicalNames),
$"Radical names: {string.Join(", ", result.RadicalNames)}",
$"Radical names: {string.Join('、', result.RadicalNames)}",
ConfigManager.DefinitionsColor,
ConfigManager.DefinitionsFontSize,
PopupContextMenu,
Expand Down
4 changes: 2 additions & 2 deletions JL.Windows/Utilities/PopupWindowUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static TextBox CreateTextBox(string name, string text, Brush foregroundBr
}

public static Grid CreatePitchAccentGrid(string primarySpelling, string[]? alternativeSpellings,
string[]? readings, string[] splitReadingsWithRInfo, double leftMargin, Dict dict, IDictionary<string, IList<IDictRecord>>? pitchRecordDict)
string[]? readings, string[]? splitReadingsWithRInfo, double leftMargin, Dict dict, IDictionary<string, IList<IDictRecord>>? pitchRecordDict)
{
Grid pitchAccentGrid = new();

Expand Down Expand Up @@ -106,7 +106,7 @@ public static Grid CreatePitchAccentGrid(string primarySpelling, string[]? alter
if (i > 0)
{
horizontalOffsetForReading +=
WindowsUtils.MeasureTextSize($"{splitReadingsWithRInfo[i - 1]}, ", fontSize).Width;
WindowsUtils.MeasureTextSize($"{splitReadingsWithRInfo![i - 1]}", fontSize).Width;
}

PitchAccentRecord? chosenPitchAccentDictResult = null;
Expand Down

0 comments on commit 78b2f9c

Please sign in to comment.