diff options
| author | Emmanuel Hansen <emmausssss@gmail.com> | 2024-08-31 14:32:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-31 11:32:53 -0300 |
| commit | e0acde04bb032fd056904b909b3fd00c1a6fb996 (patch) | |
| tree | c3f146228712153af6f277e0e874d83a56b31d06 /src/Ryujinx | |
| parent | 3c61d560c39d6edf897183fe33b8047c25d2d895 (diff) | |
Replace ImageSharp with SkiaSharp everywhere (#7030)
* replace ImageSharp with SkiaSharp for inline keyboard applet rendering
* fix avalonia inline keyboard input
* remove image sharp from gtk3 project
* add skiasharp linux assets
* fix whitespace
* fix format
* fix ico image offset when saving shortcut to windows
Diffstat (limited to 'src/Ryujinx')
| -rw-r--r-- | src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs | 9 | ||||
| -rw-r--r-- | src/Ryujinx/UI/Helpers/OffscreenTextBox.cs | 3 | ||||
| -rw-r--r-- | src/Ryujinx/UI/Windows/MainWindow.axaml | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs b/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs index 531d0061..0e7cfb8e 100644 --- a/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs +++ b/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs @@ -41,17 +41,12 @@ namespace Ryujinx.Ava.UI.Applet private void TextChanged(string text) { - TextChangedEvent?.Invoke(text ?? string.Empty, _hiddenTextBox.SelectionStart, _hiddenTextBox.SelectionEnd, true); + TextChangedEvent?.Invoke(text ?? string.Empty, _hiddenTextBox.SelectionStart, _hiddenTextBox.SelectionEnd, false); } private void SelectionChanged(int selection) { - if (_hiddenTextBox.SelectionEnd < _hiddenTextBox.SelectionStart) - { - _hiddenTextBox.SelectionStart = _hiddenTextBox.SelectionEnd; - } - - TextChangedEvent?.Invoke(_hiddenTextBox.Text ?? string.Empty, _hiddenTextBox.SelectionStart, _hiddenTextBox.SelectionEnd, true); + TextChangedEvent?.Invoke(_hiddenTextBox.Text ?? string.Empty, _hiddenTextBox.SelectionStart, _hiddenTextBox.SelectionEnd, false); } private void AvaloniaDynamicTextInputHandler_TextInput(object sender, string text) diff --git a/src/Ryujinx/UI/Helpers/OffscreenTextBox.cs b/src/Ryujinx/UI/Helpers/OffscreenTextBox.cs index a055f335..dd736037 100644 --- a/src/Ryujinx/UI/Helpers/OffscreenTextBox.cs +++ b/src/Ryujinx/UI/Helpers/OffscreenTextBox.cs @@ -1,11 +1,14 @@ using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; +using System; namespace Ryujinx.Ava.UI.Helpers { public class OffscreenTextBox : TextBox { + protected override Type StyleKeyOverride => typeof(TextBox); + public static RoutedEvent<KeyEventArgs> GetKeyDownRoutedEvent() { return KeyDownEvent; diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml b/src/Ryujinx/UI/Windows/MainWindow.axaml index 6c2042f9..3a2e02c2 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml @@ -42,12 +42,10 @@ </Window.KeyBindings> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> - <helpers:OffscreenTextBox Name="HiddenTextBox" Grid.Row="0" /> + <helpers:OffscreenTextBox IsEnabled="False" Opacity="0" Name="HiddenTextBox" IsHitTestVisible="False" IsTabStop="False" /> <Grid - Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid.ColumnDefinitions> |
