diff --git a/src/Greenshot.Editor/Controls/EmojiControl.cs b/src/Greenshot.Editor/Controls/EmojiControl.cs index 71df67f2a..c32100174 100644 --- a/src/Greenshot.Editor/Controls/EmojiControl.cs +++ b/src/Greenshot.Editor/Controls/EmojiControl.cs @@ -20,8 +20,6 @@ namespace Greenshot.Editor.Controls set { SetValue(EmojiProperty, value); } } - public static readonly DependencyProperty UseSystemFontProperty = DependencyProperty.Register("UseSystemFont", typeof(bool), typeof(EmojiControl), new PropertyMetadata(default(bool), OnUseSystemFontPropertyChanged)); - private static void OnUseSystemFontPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ((EmojiControl)d).Source = null; @@ -31,16 +29,10 @@ namespace Greenshot.Editor.Controls { if (Source == null && !string.IsNullOrEmpty(Emoji)) { - Source = EmojiRenderer.GetBitmapSource(Emoji, iconSize: 48, useSystemFont: UseSystemFont); + Source = EmojiRenderer.GetBitmapSource(Emoji, iconSize: 48, useSystemFont: false); } base.OnRender(dc); } - - public bool UseSystemFont - { - get { return (bool)GetValue(UseSystemFontProperty); } - set { SetValue(UseSystemFontProperty, value); } - } } } diff --git a/src/Greenshot.Editor/Controls/EmojiPicker.xaml b/src/Greenshot.Editor/Controls/EmojiPicker.xaml index 282f58957..ba5a4e547 100644 --- a/src/Greenshot.Editor/Controls/EmojiPicker.xaml +++ b/src/Greenshot.Editor/Controls/EmojiPicker.xaml @@ -36,7 +36,7 @@ @@ -48,7 +48,7 @@ x:Name="VariationButton" Background="Transparent" BorderBrush="Transparent" Click="OnEmojiPicked" Focusable="False" ToolTip="{Binding Path=Name}"> - - + @@ -134,9 +134,6 @@ - - Use system font - diff --git a/src/Greenshot.Editor/Controls/EmojiPicker.xaml.cs b/src/Greenshot.Editor/Controls/EmojiPicker.xaml.cs index 960dc5218..2d766efc0 100644 --- a/src/Greenshot.Editor/Controls/EmojiPicker.xaml.cs +++ b/src/Greenshot.Editor/Controls/EmojiPicker.xaml.cs @@ -45,14 +45,6 @@ namespace Greenshot.Editor.Controls public IList EmojiGroups => EmojiData.AllGroups; - public static readonly DependencyProperty UseSystemFontProperty = DependencyProperty.Register("UseSystemFont", typeof(bool), typeof(EmojiPicker), new PropertyMetadata(default(bool))); - - public bool UseSystemFont - { - get { return (bool)GetValue(UseSystemFontProperty); } - set { SetValue(UseSystemFontProperty, value); } - } - // Backwards compatibility for when the backend was a TextBlock. public double FontSize { diff --git a/src/Greenshot.Editor/Drawing/EmojiContainer.cs b/src/Greenshot.Editor/Drawing/EmojiContainer.cs index 5a8436989..bec010d24 100644 --- a/src/Greenshot.Editor/Drawing/EmojiContainer.cs +++ b/src/Greenshot.Editor/Drawing/EmojiContainer.cs @@ -22,13 +22,11 @@ using System; using System.ComponentModel; using System.Linq; -using System.Runtime.Serialization; using System.Windows.Forms; using System.Windows.Forms.Integration; using Greenshot.Base.Core; using Greenshot.Base.Interfaces.Drawing; using Greenshot.Editor.Controls; -using Greenshot.Editor.Drawing.Adorners; using Greenshot.Editor.Helpers; using Image = System.Drawing.Image; @@ -47,7 +45,6 @@ namespace Greenshot.Editor.Drawing [NonSerialized] private bool _justCreated = true; private string _emoji; - private bool _useSystemFont; public string Emoji { @@ -59,16 +56,6 @@ namespace Greenshot.Editor.Drawing } } - public bool UseSystemFont - { - get => _useSystemFont; - set - { - _useSystemFont = value; - ResetCachedBitmap(); - } - } - public EmojiContainer(Surface parent) : this(parent, "🙂", size: 64) { } @@ -114,7 +101,6 @@ namespace Greenshot.Editor.Drawing _emojiPicker.Picked += (_, args) => { _currentContainer.Emoji = args.Emoji; - _currentContainer.UseSystemFont = _emojiPicker.UseSystemFont; _currentContainer.Invalidate(); }; @@ -169,7 +155,7 @@ namespace Greenshot.Editor.Drawing var iconSize = Math.Min(Bounds.Width, Bounds.Height); if (iconSize <= 0) return null; - var image = EmojiRenderer.GetBitmap(Emoji, iconSize, useSystemFont: _useSystemFont); + var image = EmojiRenderer.GetBitmap(Emoji, iconSize, useSystemFont: false); if (RotationAngle != 0) { var newImage = image.Rotate(RotationAngle);