Skip to content

Commit

Permalink
Merge pull request #1286 from maiko3tattun/240920_LyricBoxAlignment
Browse files Browse the repository at this point in the history
Fix LyricBox UI
  • Loading branch information
stakira authored Nov 11, 2024
2 parents d73ea6b + cebff2a commit a0b1460
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions OpenUtau/Controls/LyricBox.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
</ListBox.Styles>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0" Width="360" HorizontalAlignment="Left" Background="Transparent" PointerPressed="ListBox_PointerPressed">
<TextBlock Margin="4" Grid.Column="0" HorizontalAlignment="Left" IsHitTestVisible="False" Text="{Binding Alias}"/>
<TextBlock Margin="4,4,24,4" Grid.Column="1" HorizontalAlignment="Right" IsHitTestVisible="False" FontSize="10" Text="{Binding Source}"/>
</Grid>
<DockPanel Margin="0" Width="360" Background="Transparent" PointerPressed="ListBox_PointerPressed" ToolTip.Tip="{Binding Source}">
<TextBlock Margin="4" DockPanel.Dock="Left" IsHitTestVisible="False" Text="{Binding Alias}"/>
<TextBlock Margin="4" DockPanel.Dock="Right" HorizontalAlignment="Right" TextTrimming="CharacterEllipsis" IsHitTestVisible="False" FontSize="10" VerticalAlignment="Center" Text="{Binding Source}"/>
</DockPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Expand Down
3 changes: 1 addition & 2 deletions OpenUtau/ViewModels/LyricBoxViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using OpenUtau.Core.Ustx;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using WanaKanaNet;

namespace OpenUtau.App.ViewModels {
class LyricBoxViewModel : ViewModelBase {
Expand Down Expand Up @@ -57,7 +56,7 @@ private void UpdateSuggestion() {
var scheduler = TaskScheduler.FromCurrentSynchronizationContext();
Task.Run(() => singer.GetSuggestions(Text ?? "").Select(oto => new SuggestionItem() {
Alias = oto.Alias,
Source = string.IsNullOrEmpty(oto.Set) ? singer.Id : $"{singer.Id} / {oto.Set}",
Source = string.IsNullOrEmpty(oto.Set) ? singer.Id : $"{oto.Set}",
}).Take(32).ToList()).ContinueWith(task => {
Suggestions.Clear();
if (!string.IsNullOrEmpty(Text) && Core.Util.ActiveLyricsHelper.Inst.Current != null) {
Expand Down

0 comments on commit a0b1460

Please sign in to comment.