mirror of
https://github.com/muskit/MercuryConverter.git
synced 2026-06-02 20:24:26 -07:00
tweak selection view
This commit is contained in:
@@ -15,9 +15,6 @@
|
|||||||
ExtendClientAreaToDecorationsHint="True"
|
ExtendClientAreaToDecorationsHint="True"
|
||||||
>
|
>
|
||||||
<dialogHost:DialogHost CloseOnClickAway="False" Name="Dialog">
|
<dialogHost:DialogHost CloseOnClickAway="False" Name="Dialog">
|
||||||
<dialogHost:DialogHost.DialogContent>
|
|
||||||
<Button Content="Test"/>
|
|
||||||
</dialogHost:DialogHost.DialogContent>
|
|
||||||
|
|
||||||
<!-- Components -->
|
<!-- Components -->
|
||||||
<Panel>
|
<Panel>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public partial class MainWindow : Window
|
|||||||
// Show dialog on startup
|
// Show dialog on startup
|
||||||
Activated += OnActivated;
|
Activated += OnActivated;
|
||||||
|
|
||||||
Selection.selections.CollectionChanged += OnDbSelChanged;
|
Selection.Selections.CollectionChanged += OnDbSelChanged;
|
||||||
Database.Songs.CollectionChanged += OnDbSelChanged;
|
Database.Songs.CollectionChanged += OnDbSelChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
if (Database.Songs.Count > 0)
|
if (Database.Songs.Count > 0)
|
||||||
{
|
{
|
||||||
TabSelection.Header = $"selection ({Selection.selections.Count}/{Database.Songs.Count})";
|
TabSelection.Header = $"selection ({Selection.Selections.Count}/{Database.Songs.Count})";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,6 @@
|
|||||||
</ToolTip.Tip>
|
</ToolTip.Tip>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
|
|
||||||
<TextBlock Name="DesignerTxt" Text="muskit" HorizontalAlignment="Center" ToolTip.Tip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
<TextBlock Name="DesignerTxt" Text="Charter" TextWrapping="Wrap" TextAlignment="Center" HorizontalAlignment="Center" ToolTip.Tip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -21,11 +21,10 @@
|
|||||||
<StackPanel Name="SelectionInfo">
|
<StackPanel Name="SelectionInfo">
|
||||||
<TextBlock Name="InfoId" FontFamily="monospace" Text="S00-000" HorizontalAlignment="Center"/>
|
<TextBlock Name="InfoId" FontFamily="monospace" Text="S00-000" HorizontalAlignment="Center"/>
|
||||||
<Image Name="InfoImageJacket" Margin="24 0 24 0" Source="/Assets/imgs/jacket-placeholder.png"/>
|
<Image Name="InfoImageJacket" Margin="24 0 24 0" Source="/Assets/imgs/jacket-placeholder.png"/>
|
||||||
<TextBlock Name="InfoNameText" Text="Name" FontWeight="Bold" HorizontalAlignment="Center" Margin="0 10 0 0" ToolTip.Tip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
<TextBlock Name="InfoNameText" Text="Name" FontWeight="Bold" TextTrimming="WordEllipsis" TextAlignment="Center" HorizontalAlignment="Center" Margin="0 10 0 0" ToolTip.Tip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
||||||
<TextBlock Name="InfoArtistText" Text="Artist" HorizontalAlignment="Center" ToolTip.Tip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
<TextBlock Name="InfoArtistText" Text="Artist" TextTrimming="CharacterEllipsis" TextAlignment="Center" HorizontalAlignment="Center" ToolTip.Tip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
||||||
<TextBlock Name="InfoSourceText" Text="Source" HorizontalAlignment="Center" Margin="0 6 0 0"/>
|
<TextBlock Name="InfoSourceText" Text="Source" HorizontalAlignment="Center" Margin="0 6 0 0"/>
|
||||||
<StackPanel Name="ChartInfoGroup" Margin="0 20 0 0">
|
<StackPanel Name="ChartInfoGroup" Margin="0 20 0 0"/>
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Filters" FontSize="16">
|
<TabItem Header="Filters" FontSize="16">
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace MercuryConverter.UI.Views;
|
|||||||
|
|
||||||
public partial class Selection : Panel
|
public partial class Selection : Panel
|
||||||
{
|
{
|
||||||
public static ObservableRangeCollection<Song> selections = new();
|
public static ObservableRangeCollection<Song> Selections { get; } = new();
|
||||||
|
|
||||||
public Selection()
|
public Selection()
|
||||||
{
|
{
|
||||||
@@ -62,13 +62,13 @@ public partial class Selection : Panel
|
|||||||
|
|
||||||
private void OnSelectionChange(object? sender, SelectionChangedEventArgs e)
|
private void OnSelectionChange(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
selections.Clear();
|
Selections.Clear();
|
||||||
List<Song> sels = new();
|
List<Song> sels = new();
|
||||||
foreach (Song s in ListingTable.SelectedItems)
|
foreach (Song s in ListingTable.SelectedItems)
|
||||||
{
|
{
|
||||||
sels.Add(s);
|
sels.Add(s);
|
||||||
}
|
}
|
||||||
selections.AddRange(sels);
|
Selections.AddRange(sels);
|
||||||
|
|
||||||
if (ListingTable.SelectedItems.Count > 0)
|
if (ListingTable.SelectedItems.Count > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user