Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
NickeManarin committed Aug 14, 2022
2 parents 427654d + a756c99 commit c734573
Show file tree
Hide file tree
Showing 13 changed files with 2,980 additions and 199 deletions.
33 changes: 3 additions & 30 deletions ScreenToGif.Native/Helpers/Other.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void DrawFrame(IntPtr hWnd, double scale)

Gdi32.PatBlt(hdc, rect.Right, rect.Bottom - frameWidth, -(rect.Right - rect.Left), frameWidth, Constants.DstInvert);
}

internal static string CheckAllFlags(uint style, bool isExtended)
{
var values = Enum.GetValues(typeof(WindowStyles)).OfType<WindowStyles>().Distinct().ToList();
Expand All @@ -55,7 +55,7 @@ internal static string CheckAllFlags(uint style, bool isExtended)

return text.TrimEnd(' ').TrimEnd(',');
}

public static char? GetCharFromKey(Key key, bool ignoreState = true)
{
var virtualKey = KeyInterop.VirtualKeyFromKey(key);
Expand All @@ -71,7 +71,6 @@ internal static string CheckAllFlags(uint style, bool isExtended)

switch (result)
{
case -1:
case 0:
break;
default: //Case 1
Expand All @@ -83,32 +82,6 @@ internal static string CheckAllFlags(uint style, bool isExtended)

public static string GetSelectKeyText(Key key, ModifierKeys modifier = ModifierKeys.None, bool isUppercase = false, bool ignoreNone = false)
{
//Key translation.
switch (key)
{
case Key.Oem1:
key = Key.OemSemicolon;
break;
case Key.Oem2:
key = Key.OemQuestion;
break;
case Key.Oem3:
key = Key.OemTilde;
break;
case Key.Oem4:
key = Key.OemOpenBrackets;
break;
case Key.Oem5:
key = Key.OemPipe;
break;
case Key.Oem6:
key = Key.OemCloseBrackets;
break;
case Key.Oem7:
key = Key.OemComma;
break;
}

if (ignoreNone && key == Key.None)
return "";

Expand Down Expand Up @@ -226,7 +199,7 @@ public static string GetSelectKeyText(ModifierKeys modifier = ModifierKeys.None)

return modifiersText;
}

public static Point GetMousePosition(double scale = 1, double offsetX = 0, double offsetY = 0)
{
var point = new PointW();
Expand Down
19 changes: 10 additions & 9 deletions ScreenToGif/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<ResourceDictionary Source="/Resources/Localization/StringResources.el.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.es-AR.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.es.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.fi.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.fr.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.ja.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.he.xaml"/>
Expand Down Expand Up @@ -86,18 +87,18 @@
<n:NotifyIcon x:Key="NotifyIcon" IconSource="/Resources/Logo.ico" DataContext="{StaticResource AppViewModel}" NotifyToolTipText="ScreenToGif" Visibility="Collapsed"
LeftClickCommand="{Binding TrayLeftClick}" DoubleLeftClickCommand="{Binding TrayDoubleLeftClick}" MiddleClickCommand="{Binding TrayMiddleClick}">
<n:NotifyIcon.ContextMenu>

<ContextMenu>
<n:ExtendedMenuItem Header="{DynamicResource S.NewRecording}" Icon="{StaticResource Vector.Record.New}" Command="{Binding OpenRecorder}" InputGestureText="{Binding RecorderGesture, UpdateSourceTrigger=PropertyChanged}"/>
<n:ExtendedMenuItem Header="{DynamicResource S.NewWebcamRecording}" Icon="{StaticResource Vector.Camera.New}" Command="{Binding OpenWebcamRecorder}" InputGestureText="{Binding WebcamRecorderGesture, UpdateSourceTrigger=PropertyChanged}"/>
<n:ExtendedMenuItem Header="{DynamicResource S.NewBoardRecording}" Icon="{StaticResource Vector.Board.New}" Command="{Binding OpenBoardRecorder}" InputGestureText="{Binding BoardRecorderGesture, UpdateSourceTrigger=PropertyChanged}"/>
<n:ExtendedMenuItem Header ="{StaticResource S.NewRecording}" Icon="{StaticResource Vector.Record.New}" Command="{Binding OpenRecorder}" InputGestureText="{Binding RecorderGesture, UpdateSourceTrigger=PropertyChanged}" Tag="S.NewRecording"/>
<n:ExtendedMenuItem Header ="{StaticResource S.NewWebcamRecording}" Icon="{StaticResource Vector.Camera.New}" Command="{Binding OpenWebcamRecorder}" InputGestureText="{Binding WebcamRecorderGesture, UpdateSourceTrigger=PropertyChanged}" Tag="S.NewWebcamRecording"/>
<n:ExtendedMenuItem Header="{StaticResource S.NewBoardRecording}" Icon="{StaticResource Vector.Board.New}" Command="{Binding OpenBoardRecorder}" InputGestureText="{Binding BoardRecorderGesture, UpdateSourceTrigger=PropertyChanged}" Tag="S.NewBoardRecording"/>
<Separator/>
<n:ExtendedMenuItem Header="{DynamicResource S.StartUp.Editor}" Icon="{StaticResource Vector.Editor}" Command="{Binding OpenEditor}" InputGestureText="{Binding EditorGesture, UpdateSourceTrigger=PropertyChanged}"/>
<n:ExtendedMenuItem Header="{DynamicResource S.StartUp.Options}" Icon="{StaticResource Vector.Options}" Command="{Binding OpenOptions}" InputGestureText="{Binding OptionsGesture, UpdateSourceTrigger=PropertyChanged}"/>
<n:ExtendedMenuItem Header="{DynamicResource S.Feedback.Feedback}" Icon="{StaticResource Vector.Application}" Command="{Binding OpenFeedback}"/>
<n:ExtendedMenuItem Header="{DynamicResource S.Troubleshoot.Title}" Icon="{StaticResource Vector.Warning}" Command="{Binding OpenTroubleshoot}"/>
<n:ExtendedMenuItem Header="{StaticResource S.StartUp.Editor}" Icon="{StaticResource Vector.Editor}" Command="{Binding OpenEditor}" InputGestureText="{Binding EditorGesture, UpdateSourceTrigger=PropertyChanged}" Tag="S.StartUp.Editor"/>
<n:ExtendedMenuItem Header="{StaticResource S.StartUp.Options}" Icon="{StaticResource Vector.Options}" Command="{Binding OpenOptions}" InputGestureText="{Binding OptionsGesture, UpdateSourceTrigger=PropertyChanged}" Tag="S.StartUp.Options"/>
<n:ExtendedMenuItem Header="{StaticResource S.Feedback.Feedback}" Icon="{StaticResource Vector.Application}" Command="{Binding OpenFeedback}" Tag="S.Feedback.Feedback"/>
<n:ExtendedMenuItem Header="{StaticResource S.Troubleshoot.Title}" Icon="{StaticResource Vector.Warning}" Command="{Binding OpenTroubleshoot}" Tag="S.Troubleshoot.Title"/>
<Separator/>
<n:ExtendedMenuItem x:Name="ExitButton" Header="{DynamicResource S.Exit}" Icon="{StaticResource Vector.Close}" Command="{Binding ExitApplication}"
InputGestureText="{Binding ExitGesture, UpdateSourceTrigger=PropertyChanged}"/>
<n:ExtendedMenuItem Header="{StaticResource S.Exit}" Icon="{StaticResource Vector.Close}" Command="{Binding ExitApplication}" InputGestureText="{Binding ExitGesture, UpdateSourceTrigger=PropertyChanged}" Tag="S.Exit"/>
</ContextMenu>
</n:NotifyIcon.ContextMenu>
</n:NotifyIcon>
Expand Down
17 changes: 6 additions & 11 deletions ScreenToGif/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@ This is the current project of ScreenToGif.

_VS 2022 and .NET 6 or newer required._

## What's new? (Version 2.36)
## What's new? (Version 2.37.1)

• New installer and portable versions with the full package (no .NET 6 download required) are available alongside with the lighter versions, which still require the installation of .NET 6 desktop runtime.
• New installer package (MSIX) available.
• Added an option to prompt to overwrite when saving (enabled by default).
• Updated the Danish, French, German, Hungarian, Polish, Norwegian, Russian, and Simplified Chinese localizations.
• Added Finnish localization.
• Updated the German, Hungarian, Russian, and Polish localizations.

### Fixed:

♦ The smooth loop feature was not working properly.
♦ A new message will be displayed if you already have a smooth loop based on current settings instead of a warning.
♦ It was not possible to set the app to start at Windows startup.
♦ A settings migration issue from 2.31 to newer versions was fixed.
♦ It was not possible to export as PSD.
♦ When not having permission to save the settings to the installation location, the app would not try to save to AppData.
♦ Replaced space with dash in filename used when exporting multiple images.
♦ Context menu from system tray icon now follows the current language.
♦ Improved key to text translations for the KeyPresses feature (thanks to @jfbueno).

### Known Bugs:

Expand Down
5 changes: 5 additions & 0 deletions ScreenToGif/Resources/Flags.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,9 @@
<Path Fill="#ff23923b" Data="F1 M 40.000,26.667 L 0.000,26.667 L 0.000,17.778 L 40.000,17.778 L 40.000,26.667 Z"/>
<Path Fill="#ffffffff" Data="F1 M 40.000,17.778 L 0.000,17.778 L 0.000,8.889 L 40.000,8.889 L 40.000,17.778 Z"/>
</Canvas>

<Canvas x:Shared="False" x:Key="Flag.Finland" HorizontalAlignment="Center" UseLayoutRounding="False" VerticalAlignment="Center" Width="40" Height="24.4">
<Path Fill="#ffffffff" Data="F1 M 40.000,24.4 L 40.000,0.000 L 0.000,0.000 L 0.000,24.4 L 40.000,24.4 Z"/>
<Path Fill="#ff005a9b" Data="F1 M 11.105,0.000 L 11.105,8.883 L 0.000,8.883 L 0.000,15.548 L 11.105,15.548 L 11.105,24.436 L 17.769,24.436 L 17.769,15.548 L 40.000,15.548 L 40.000,8.883 L 17.769,8.883 L 17.769,0.000 L 11.105,0.000 Z"/>
</Canvas>
</ResourceDictionary>
Loading

0 comments on commit c734573

Please sign in to comment.