Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Feb 11, 2024
1 parent 043c4c7 commit 0b879db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions JL.Windows/GUI/PopupWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ private async void TextBox_MouseMove(object sender, MouseEventArgs? e)
|| ConfigManager.LookupOnMouseClickOnly
|| e?.LeftButton is MouseButtonState.Pressed
|| PopupContextMenu.IsVisible
|| ReadingsAudioWindow.IsItVisible()
|| ReadingSelectionWindow.IsItVisible()
|| (ConfigManager.RequireLookupKeyPress
&& !KeyGestureUtils.CompareKeyGesture(ConfigManager.LookupKeyKeyGesture)))
{
Expand Down Expand Up @@ -1052,7 +1052,7 @@ private async void AudioButton_Click(object sender, RoutedEventArgs e)
}
else
{
ReadingsAudioWindow.Show(lookupResult.PrimarySpelling, lookupResult.Readings, this);
ReadingSelectionWindow.Show(lookupResult.PrimarySpelling, lookupResult.Readings, this);
}
}

Expand Down Expand Up @@ -1564,7 +1564,7 @@ private void OnMouseLeave(object sender, MouseEventArgs e)
if (ConfigManager.AutoHidePopupIfMouseIsNotOverIt)
{
if (PopupContextMenu.IsVisible
|| ReadingsAudioWindow.IsItVisible()
|| ReadingSelectionWindow.IsItVisible()
|| AddWordWindow.IsItVisible()
|| AddNameWindow.IsItVisible())
{
Expand Down Expand Up @@ -1678,7 +1678,7 @@ private void PopupContextMenu_IsVisibleChanged(object sender, DependencyProperty

private void Window_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
ReadingsAudioWindow.HideWindow();
ReadingSelectionWindow.HideWindow();

if (ChildPopupWindow is { MiningMode: true })
{
Expand Down Expand Up @@ -1715,7 +1715,7 @@ public void HidePopup()
_ = mainWindow.ChangeVisibility().ConfigureAwait(true);
}

ReadingsAudioWindow.HideWindow();
ReadingSelectionWindow.HideWindow();

if (!IsVisible)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Window x:Class="JL.Windows.GUI.ReadingsAudioWindow"
<Window x:Class="JL.Windows.GUI.ReadingSelectionWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="ReadingsAudioWindow" SizeToContent="WidthAndHeight" WindowStyle="None" Topmost="True"
SizeToContent="WidthAndHeight" WindowStyle="None" Topmost="True"
ShowInTaskbar="False" AllowsTransparency="True" Focusable="False" x:ClassModifier="internal">
<Grid>
<ListView x:Name="ReadingsListView" VirtualizingStackPanel.VirtualizationMode="Recycling" Focusable="False"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

namespace JL.Windows.GUI;
/// <summary>
/// Interaction logic for ReadingsAudioWindow.xaml
/// Interaction logic for ReadingSelectionWindow.xaml
/// </summary>
internal sealed partial class ReadingsAudioWindow : Window
internal sealed partial class ReadingSelectionWindow : Window
{
private string? _primarySpelling;
private nint _windowHandle;

private static ReadingsAudioWindow? s_instance;
private static ReadingSelectionWindow? s_instance;

private ReadingsAudioWindow()
private ReadingSelectionWindow()
{
InitializeComponent();
}
Expand All @@ -27,7 +27,7 @@ public static bool IsItVisible()

public static void Show(string primarySpelling, string[] readings, Window window)
{
ReadingsAudioWindow currentInstance = s_instance ??= new ReadingsAudioWindow();
ReadingSelectionWindow currentInstance = s_instance ??= new ReadingSelectionWindow();
currentInstance._primarySpelling = primarySpelling;
currentInstance.ReadingsListView.ItemsSource = readings;
currentInstance.ReadingsListView.Background = ConfigManager.PopupBackgroundColor;
Expand Down

0 comments on commit 0b879db

Please sign in to comment.