Skip to content

Commit

Permalink
Add tooltip to LyricBox
Browse files Browse the repository at this point in the history
  • Loading branch information
Maiko committed Nov 3, 2024
1 parent 78d9d39 commit cebff2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OpenUtau/Controls/LyricBox.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ListBox.Styles>
<ListBox.ItemTemplate>
<DataTemplate>
<DockPanel Margin="0" Width="360" Background="Transparent" PointerPressed="ListBox_PointerPressed">
<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>
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 cebff2a

Please sign in to comment.