mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-28 14:27:10 +02:00
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
This commit is contained in:
parent
3c61d560c3
commit
e0acde04bb
14 changed files with 296 additions and 256 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue