Skip to content

Commit 6177693

Browse files
Fix visual quirks
1 parent d75af88 commit 6177693

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

MSURandomizer/Services/UnknownMsuWindowService.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ public UnknownMsuWindowViewModel InitilizeModel()
3535

3636
if (msuModel.MsuPath.Length > MaxPathLength)
3737
{
38-
msuModel.MsuPath = $"...{msuModel.MsuPath.Substring(msuModel.MsuPath.Length - MaxPathLength)}";
38+
msuModel.AbbreviatedPath = $"...{msuModel.MsuPath.Substring(msuModel.MsuPath.Length - MaxPathLength)}";
39+
}
40+
else
41+
{
42+
msuModel.AbbreviatedPath = msuModel.MsuPath;
3943
}
4044

4145
msuModel.PropertyChanged += (sender, args) =>
@@ -58,7 +62,6 @@ public void Save()
5862
foreach (var msuModel in _model.UnknownMsus.Where(x => x.Msu != null))
5963
{
6064
mapper.Map(msuModel, msuModel.Msu!.Settings);
61-
msuModel.Msu.Settings.MsuPath = msuModel.Msu.Path;
6265
msuModel.Msu.Settings.IsUserUnknownMsu = string.IsNullOrEmpty(msuModel.MsuTypeName);
6366
userOptionsService.UpdateMsuSettings(msuModel.Msu);
6467
msuCacheService.Remove(msuModel.Msu.Path, false);

MSURandomizer/ViewModels/MsuDetailsWindowViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ namespace MSURandomizer.ViewModels;
1010
public class MsuDetailsWindowViewModel : ViewModelBase
1111
{
1212
[Reactive] public string MsuPath { get; set; } = "";
13+
14+
[Reactive] public string AbbreviatedPath { get; set; } = "";
1315

1416
[Reactive] public string? MsuTypeName { get; set; }
1517

MSURandomizer/Views/UnknownMsuWindow.axaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
88
Width="800"
99
Height="450"
10+
MinWidth="800"
11+
MinHeight="450"
1012
x:Class="MSURandomizer.Views.UnknownMsuWindow"
13+
CanResize="False"
1114
Title="Unknown MSUs"
1215
Closed="TopLevel_OnClosed"
1316
x:DataType="viewModels:UnknownMsuWindowViewModel">
@@ -28,7 +31,7 @@
2831
<DataTemplate>
2932
<StackPanel Orientation="Vertical" Margin="5">
3033
<Grid ColumnDefinitions="*, *" RowDefinitions="Auto, Auto">
31-
<TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding MsuPath}"></TextBlock>
34+
<TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding AbbreviatedPath}" ToolTip.Tip="{Binding MsuPath}"></TextBlock>
3235
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding TrackCountString}"></TextBlock>
3336
<ComboBox Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" ItemsSource="{Binding MsuTypeNames}"
3437
SelectedItem="{Binding MsuTypeName}"

0 commit comments

Comments
 (0)