Skip to content

Commit

Permalink
Fixed bug in settingwindow
Browse files Browse the repository at this point in the history
  • Loading branch information
EX3exp committed Sep 29, 2024
1 parent 196f279 commit 834e081
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Mirivoice/Assets/Lang/en-US.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<system:String x:Key="updater.status.unknown">Update Checking Failed...</system:String>
<system:String x:Key="updater.update">Update</system:String>

<system:String x:Key="singlelinebox.placeholder">(Line is empty)</system:String>

<system:String x:Key="edits.phoneme">Phoneme</system:String>

<!-- Menu -->
<!--files...-->
Expand Down
3 changes: 3 additions & 0 deletions Mirivoice/Assets/Lang/ko-KR.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<system:String x:Key="updater.status.unknown">업데이트 확인 실패...</system:String>
<system:String x:Key="updater.update">업데이트</system:String>

<system:String x:Key="singlelinebox.placeholder">(대사가 비어 있어요)</system:String>

<system:String x:Key="edits.phoneme">음소</system:String>

<!-- Menu -->
<!--files...-->
Expand Down
30 changes: 30 additions & 0 deletions Mirivoice/ViewModels/GlobalSettingWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,36 @@ public bool UseBeta
}
public GlobalSettingWindowViewModel()
{
switch (MainManager.Instance.Setting.Langcode)
{
case "en-US":
SelectedLanguageIndex = 0;
break;
case "ko-KR":
SelectedLanguageIndex = 1;
break;
default:
SelectedLanguageIndex = 0;
break;
}

if (MainManager.Instance.Setting.ClearCacheOnQuit)
{
ClearCacheOnQuit = true;
}
else
{
ClearCacheOnQuit = false;
}

if (MainManager.Instance.Setting.UseBeta)
{
UseBeta = true;
}
else
{
UseBeta = false;
}
}
}
}
2 changes: 1 addition & 1 deletion Mirivoice/Views/MainView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<li:LoadingIndicator IsVisible="{Binding IsArcActive, Mode=TwoWay}" IsActive="{Binding IsArcActive, Mode=TwoWay}" Background="White" Grid.Row="1" Grid.RowSpan="2" Grid.Column="0" Mode="Ring" SpeedRatio="1.5" />
<StackPanel Grid.Row="0" Grid.Column="0">
<ComboBox Cursor="Hand" SelectedIndex="{Binding CurrentEditIndex}" Grid.Column="0" FontSize="15" CornerRadius="2" IsHitTestVisible="{Binding MainWindowGetInput}">
<ComboBoxItem>Phoneme</ComboBoxItem>
<ComboBoxItem Content="{DynamicResource singlelinebox.placeholder}"></ComboBoxItem>
<!--<ComboBoxItem>Pitch</ComboBoxItem>-->
</ComboBox>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion Mirivoice/Views/SingleLineEditorView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
x:Class="Mirivoice.SingleLineEditorView">

<Border>
<TextBox AcceptsReturn="True" LostFocus="LineLostFocus" GotFocus="LineGotFocus" TextChanged="LineTextChanged" TextWrapping="Wrap" Text="{Binding mTextBoxEditor.CurrentScript, Mode=TwoWay}" IsUndoEnabled="False" Watermark="(Line is Empty)" FontSize="15" CornerRadius="0"></TextBox>
<TextBox AcceptsReturn="True" LostFocus="LineLostFocus" GotFocus="LineGotFocus" TextChanged="LineTextChanged" TextWrapping="Wrap" Text="{Binding mTextBoxEditor.CurrentScript, Mode=TwoWay}" IsUndoEnabled="False" Watermark="{DynamicResource singlelinebox.placeholder}" FontSize="15" CornerRadius="0"></TextBox>
</Border>
</UserControl>

0 comments on commit 834e081

Please sign in to comment.